Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

2.11 Calculated Columns vs Measures & Composite Models

Lesson 21 of 62 in the free Power BI notes on Siksha Sarovar, written by Rohit Jangra.

Calculated Columns vs Measures

Both are created using DAX, but they serve very different purposes and behave differently.

Calculated Columns

• Created using DAX formulas in the Data View • Computed row by row — each row gets its own value • Stored in the data model (increases file size) • Evaluated during data refresh • Can be used for filtering, slicing, and in relationships

Creating a Calculated Column:

  1. Go to Data View
  2. Click New Column in the ribbon
  3. Write a DAX formula in the formula bar

Example:

Profit = [Revenue] - [Cost]

Example with IF:

Performance = IF([Sales] > 10000, "High", "Low")

Measures

• Created using DAX formulas in the Report View or Data View • Computed dynamically based on the current filter context • NOT stored row by row — calculated on the fly • Do NOT increase file size significantly • Used for aggregations displayed in visuals

Creating a Measure:

  1. Click New Measure in the ribbon
  2. Write a DAX formula in the formula bar

Example:

Total Sales = SUM(Sales[Amount])

Example with CALCULATE:

East Sales = CALCULATE(SUM(Sales[Amount]), Region[Name] = "East")

Key Differences

FeatureCalculated ColumnMeasure
EvaluationRow by rowAggregate (dynamic)
StorageStored in modelCalculated on-the-fly
Filter ContextRow contextFilter context
File Size ImpactIncreasesMinimal
Can Be Used in SlicerYesNo
RecalculatedOn data refreshOn every interaction
Best ForCategorization, fixed valuesAggregations, KPIs, dynamic calculations

When to Use Which?

Use Calculated Column when: • You need a new category or label for each row • The value won't change with filters (e.g., Profit per row) • You need to use it in a slicer or filter

Use Measure when: • You need a dynamic aggregation (Sum, Average, Count) • The result should change when filters are applied • You're calculating KPIs, percentages, or running totals

Working with Composite Models

Composite models allow you to combine Import and DirectQuery data sources in the same Power BI report.

What is a Composite Model? • Uses multiple connection modes simultaneously • Some tables are imported (cached locally) • Other tables use DirectQuery (queried in real-time)

Why Use Composite Models? • Combine high-performance imported data with real-time DirectQuery data • Use imported lookup/dimension tables with large DirectQuery fact tables • Reduce data refresh times by importing only small tables

How to Create a Composite Model:

  1. Import data from a source (e.g., Excel dimension tables)
  2. Add a DirectQuery source (e.g., SQL Server fact table)
  3. Power BI prompts you to switch to a composite model
  4. Create relationships between imported and DirectQuery tables

Storage Modes in Composite Models:

ModeDescription
ImportData fully cached in Power BI
DirectQueryData queried from source in real-time
DualCan act as Import or DirectQuery depending on context

Best Practices: • Set small dimension tables to Import mode • Keep large fact tables in DirectQuery mode • Use Dual mode for tables referenced by both Import and DirectQuery tables • Test performance carefully — mixing modes can create complex query plans