Module 04 · DAX basics

Essential DAX functions

CALCULATE, time intelligence, and the big patterns.

Step by step9 minLesson 14 of 21 Free

  1. Step 1: CALCULATE modifies filter context — for example, revenue for the Online channel only:

    DAX
    Revenue (Online) = CALCULATE([Total Revenue], Sales[Channel] = "Online")
  2. Step 2: Time intelligence — year-to-date revenue (needs the Date table from Module 3):

    DAX
    Revenue YTD = TOTALYTD([Total Revenue], 'Date'[Date])
  3. Step 3: Percent of total uses ALL to remove filters:

    DAX
    Share = DIVIDE([Total Revenue], CALCULATE([Total Revenue], ALL(Sales)))

    Tip: Use DIVIDE instead of “/” — it handles divide-by-zero safely.