Become a data analyst in 90 days✦27 portfolio projects✦100+ interview Q&As✦1:1 mentor for a year✦See the 90-Day System →✦Become a data analyst in 90 days✦27 portfolio projects✦100+ interview Q&As✦1:1 mentor for a year✦See the 90-Day System →✦
New here? Want every day planned for you? See the 90-Day System →

Free PDF · Power BI

Stop memorizing every DAX function. These 10 are enough.

With the exact DAX for each. The ones you will write every week.

DGDAX10 DAX functions, real measures10@thedataguy16

DAX has hundreds of functions. Dashboards at work run on about 10.

Count it right, divide safely, change filters, go row by row, compare to last month, bucket values. That's the whole job.

Learn these first.

1-4: count it right, divide and filter

  1. 01

    SUM

    The base measure. Everything builds on it.

    Total Sales = SUM(Sales[Amount])
  2. 02

    DISTINCTCOUNT

    Unique customers, not rows.

    Customers = DISTINCTCOUNT(Sales[CustID])
  3. 03

    DIVIDE

    Returns blank instead of an error on zero.

    AOV = DIVIDE([Total Sales], [Orders])
  4. 04

    CALCULATE

    Same measure, changed filter.

    UP Sales =
    CALCULATE([Total Sales], Store[State] = "UP")

5-8: remove filters, row by row

  1. 05

    FILTER

    Row-by-row condition inside CALCULATE.

    Big Orders =
    CALCULATE([Orders],
        FILTER(Sales, Sales[Amount] > 5000))
  2. 06

    ALL

    Ignores the slicer for the total. Used for % of total.

    % Share =
    DIVIDE([Total Sales],
        CALCULATE([Total Sales], ALL(Product)))
  3. 07

    SUMX

    Multiply per row, then add up.

    Revenue =
    SUMX(Sales, Sales[Qty] * Sales[Price])
  4. 08

    RELATED

    Pull a column from the lookup table. Use it in a calculated column on Sales.

    Category = RELATED(Product[Category])

9-10: time and buckets

  1. 09

    DATEADD

    Last month's sales. Needs a marked Date table.

    Sales LM =
    CALCULATE([Total Sales],
        DATEADD('Date'[Date], -1, MONTH))
  2. 10

    SWITCH(TRUE())

    Cleaner than nested IFs.

    Band =
    SWITCH(TRUE(),
        [Total Sales] > 100000, "High",
        [Total Sales] > 50000, "Mid",
        "Low")

Build these in order. Almost every other measure is CALCULATE([Total Sales], …) with a different filter.

Free PDF

10 DAX functions you actually need

Download the PDF

Opens in Google Drive. No sign-up.

Keep going

More free PDFs

90-Day System · become a data analyst→