Module 04 · DAX basics
Essential DAX functions
CALCULATE, time intelligence, and the big patterns.
-
Step 1: CALCULATE modifies filter context — for example, revenue for the Online channel only:
DAXRevenue (Online) = CALCULATE([Total Revenue], Sales[Channel] = "Online") -
Step 2: Time intelligence — year-to-date revenue (needs the Date table from Module 3):
DAXRevenue YTD = TOTALYTD([Total Revenue], 'Date'[Date]) -
Step 3: Percent of total uses ALL to remove filters:
DAXShare = DIVIDE([Total Revenue], CALCULATE([Total Revenue], ALL(Sales)))Tip: Use DIVIDE instead of “/” — it handles divide-by-zero safely.