Calculated Measures0%
Calculated Measures
Beginner12 min read•Updated: Jul 11, 2026
Calculated Measures & Filter Context
Reading Time: 8 Mins | Level: Beginner to Advanced
1. What is a Calculated Measure?
A Calculated Measure is a dynamic DAX calculation that does not store values in tables. Instead, it computes values on demand in response to the active Filter Context created by visual elements, slicers, row headers, and column headers.
2. The Concept of Filter Context
Consider this visual: A table showing Total Sales by City.
- For the row showing "Delhi", the filter context is
City = "Delhi". - The measure
SUM(Sales[Revenue])automatically evaluates only for rows whereCity == "Delhi". - For the "Mumbai" row, the filter context shifts to
City = "Mumbai".
3. The Crown Jewel of DAX: CALCULATE()
CALCULATE() is the most important function in all of Power BI. It is the only function that can modify, override, or clear the active Filter Context:
DAX
// Overrides active city filter to calculate Delhi Sales anywhere!
Delhi Sales = CALCULATE(
[Total Sales],
Customers[City] == "Delhi"
)
// Clears all filters to calculate Grand Total (% of Total)
All Region Sales = CALCULATE(
[Total Sales],
ALL(Customers[Region])
)
Percent of Total = DIVIDE([Total Sales], [All Region Sales], 0)
Interactive Quiz
Multiple Choice Questions
Question 1
Which function is considered the most powerful and fundamental in DAX because it can modify the active filter context?
Question 2
What does the
ALL() function do when used inside CALCULATE([Total Sales], ALL(Product[Category]))?Question 3
What is 'Filter Context' in Power BI?
Question 4
What is the recommended best practice for organizing DAX measures in a complex Power BI report?
Question 5
What does the
USERELATIONSHIP() function do inside CALCULATE()?Next Lesson
Bar, Line, and Pie Charts
Continue learning with hands-on practice, examples, and exercises in the upcoming topic.
Related Lessons
| Previous Lesson | Next Lesson |
|---|---|
| Basic Functions (SUM, AVERAGE, COUNT) | Bar, Line, and Pie Charts |
Practice Quiz
Test your understanding of this lesson with 5 questions. Each question has one correct answer.