How to use the Power BI DAX Cheat Sheet
- 1. Search or browseType what you want to do, or pick one section of the Power BI DAX cheat sheet.
- 2. CopyEvery entry has its own Copy button, so it goes straight into your editor or notes.
- 3. DownloadSave the whole Power BI DAX cheat sheet as plain text or Markdown for offline revision.
What's in it
Table and column names follow a simple model: a Sales fact table with Amount, Qty, Price, CustomerID and ShipDate; Product and Store dimension tables; and a Date table marked as the date table. The 38 formulas are organised into 9 sections: Measures basics, Calculated columns, Filter context, Time intelligence, Iterators, Logic & text, Context checks, Relationships, Tables.
Example
To show growth against last year, build it in three measures: Total Sales = SUM ( Sales[Amount] ), then Sales LY = CALCULATE ( [Total Sales], SAMEPERIODLASTYEAR ( 'Date'[Date] ) ), then YoY % = DIVIDE ( [Total Sales] - [Sales LY], [Sales LY] ). If this year is ₹12 lakh and last year was ₹10 lakh, YoY % shows 0.2, which you format as 20%. DIVIDE returns blank instead of an error for a month with no sales last year.
Tips for using it
- Prefer measures to calculated columns for anything you sum or average; measures respond to slicers and don't bloat the model.
- Time intelligence needs a proper date table with one row per day and no gaps.
- Use VAR … RETURN in long measures. They are easier to debug and each variable is worked out once.
A quick look, one entry per section
- Measures basics:
Total Sales = SUM ( Sales[Amount] )(a simple measure; it recalculates for every filter in the visual) - Calculated columns:
Sales[Line Total] = Sales[Qty] * Sales[Price](calculated column: computed row by row when data refreshes and stored in the model) - Filter context:
Delhi Sales = CALCULATE ( [Total Sales], Store[City] = "Delhi" )(cALCULATE changes the filter context, here forcing City = Delhi) - Time intelligence:
Date = CALENDAR ( DATE ( 2024, 1, 1 ), DATE ( 2026, 12, 31 ) )(create a date table; mark it as the date table in Power BI) - Iterators:
Revenue = SUMX ( Sales, Sales[Qty] * Sales[Price] )(row-by-row maths without a stored column) - Logic & text:
Band = SWITCH ( TRUE (), [Total Sales] >= 1e6, "A", [Total Sales] >= 1e5, "B", "C" )(sWITCH(TRUE()) is a tidy multi-condition IF) - Context checks:
Selected City = SELECTEDVALUE ( Store[City], "All cities" )(the single value in the filter, or a fallback) - Relationships:
Ship Sales = CALCULATE ( [Total Sales], USERELATIONSHIP ( Sales[ShipDate], 'Date'[Date] ) )(use an inactive relationship for this measure) - Tables:
Top 5 = TOPN ( 5, ALL ( Product[Name] ), [Total Sales] )(table of the five best-selling products)
Search the box above for the rest of the Power BI DAX entries, or download the full sheet.
Frequently asked questions
Does this work in Excel Power Pivot too?
Yes. DAX is the same language in Power BI, Power Pivot and Analysis Services, though the newest functions may arrive in Power BI first.
Measure or calculated column?
Use a column when you need to slice or filter by the value row by row; use a measure for anything aggregated in visuals.
Is the Power BI DAX cheat sheet free?
Yes. You can search, read and copy every entry in the Power BI DAX cheat sheet without signing up. The first time you download it, we ask once for your name and WhatsApp number; after that downloads and every other Uncodemy tool open straight away.