CALCULATE and ALL
Swipe to show menu
CALCULATE is the most important function in DAX. It lets you run a calculation inside a modified filter context, which means you can write measures that ignore certain filters, apply new ones, or compare against a fixed benchmark regardless of what the report user has selected.
In this chapter you'll build several real measures using CALCULATE. By the end, you'll understand how to control filter context deliberately and have a Pct of Total Sales measure ready for your dashboard.
1. You write the measure: Pct of Total Sales = DIVIDE([Total Sales], CALCULATE([Total Sales], ALL(Sales))). A user applies a Region slicer to filter the report to West only. What does the denominator in this measure return?
2. What is the correct syntax for CALCULATE?
Everything was clear?
Thanks for your feedback!
Section 3. Chapter 6
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Section 3. Chapter 6