
The Only DAX Functions Cheat Sheet You'll Ever Need (Power BI 2026)
You open Power BI. You need to write a measure. You half-remember the syntax. You Google it. Again.
Sound familiar?
Every Power BI user — from beginners to mid-level analysts — wastes hours every week searching for DAX syntax they've already used before. The problem isn't intelligence. It's the lack of one trusted, well-organized DAX reference that actually explains when and why to use each function — not just the syntax.
This is that reference.
Why This Matters
DAX (Data Analysis Expressions) is the engine behind every Power BI report that actually does something useful. It's what separates a static table from a dynamic business intelligence system.
But DAX has over 200+ functions — and most tutorials dump a raw list on you without context. The result? Analysts who memorize syntax but don't understand logic. Interviews failed because someone couldn't explain why CALCULATE works the way it does. Reports that technically run but produce the wrong numbers.
This cheat sheet is organized by purpose — the way a working analyst thinks — not alphabetically.
Core Content: DAX Functions by Category
A. Aggregation Functions
Used to summarize data across rows
| Function | Syntax | What It Does |
|---|---|---|
SUM | SUM(Table[Column]) | Adds all values in a column |
AVERAGE | AVERAGE(Table[Column]) | Returns the arithmetic mean |
MIN | MIN(Table[Column]) | Returns the smallest value |
MAX | MAX(Table[Column]) | Returns the largest value |
COUNT | COUNT(Table[Column]) | Counts numeric values |
COUNTA | COUNTA(Table[Column]) | Counts non-blank values |
COUNTROWS | COUNTROWS(Table) | Counts rows in a table |
DISTINCTCOUNT | DISTINCTCOUNT(Table[Column]) | Counts unique values |
Pro Note: COUNTROWS on a filtered table is often more reliable than COUNT on a column — especially after FILTER() or CALCULATETABLE().
B. Filter Context Functions
The heart of DAX — controls what data your measure sees
| Function | Syntax | What It Does |
|---|---|---|
CALCULATE | CALCULATE(Expression, Filter1, Filter2...) | Evaluates expression in a modified filter context |
FILTER | FILTER(Table, Condition) | Returns a filtered table |
ALL | ALL(Table or Column) | Removes all filters from a table/column |
ALLEXCEPT | ALLEXCEPT(Table, Col1, Col2...) | Removes all filters except specified columns |
ALLSELECTED | ALLSELECTED(Table or Column) | Keeps only slicer-level filters |
KEEPFILTERS | KEEPFILTERS(Filter) | Adds filter instead of overriding |
REMOVEFILTERS | REMOVEFILTERS(Table or Column) | Explicit alias for ALL in CALCULATE |
Critical Concept: CALCULATE doesn't just filter — it transforms the filter context. Every argument after the first is a filter modifier. This is the most important DAX function to master.
C. Time Intelligence Functions
Only work with a properly marked Date Table
| Function | What It Does |
|---|---|
TOTALYTD(Expr, Dates) | Year-to-date total |
TOTALQTD(Expr, Dates) | Quarter-to-date total |
TOTALMTD(Expr, Dates) | Month-to-date total |
DATEADD(Dates, N, Interval) | Shifts date range by N periods |
SAMEPERIODLASTYEAR(Dates) | Returns same period from prior year |
PREVIOUSMONTH(Dates) | Returns prior month's date set |
DATESYTD(Dates) | Returns YTD date range |
PARALLELPERIOD(Dates, N, Interval) | Returns parallel period shifted by N |
Interview Trap: Time intelligence functions return tables of dates, not values. They must always be wrapped inside CALCULATE.
D. Iterator (X) Functions
Row-by-row calculation — then aggregate
| Function | What It Does |
|---|---|
SUMX(Table, Expression) | Sums an expression evaluated per row |
AVERAGEX(Table, Expression) | Averages an expression per row |
MAXX(Table, Expression) | Max of expression per row |
MINX(Table, Expression) | Min of expression per row |
COUNTX(Table, Expression) | Count of non-blank results per row |
RANKX(Table, Expression) | Rank of current row among table |
When to use X functions: When your calculation needs per-row logic before aggregation. Classic example: Revenue = SUMX(Sales, Sales[Qty] * Sales[Price]) — because multiplying first, then summing, gives the right answer. SUM(Qty) * SUM(Price) does not.
E. Logical Functions
| Function | What It Does |
|---|---|
IF(Condition, TrueResult, FalseResult) | Conditional expression |
SWITCH(Expression, Val1, Res1, Val2, Res2..., Default) | Multi-branch conditional |
AND(Cond1, Cond2) | Logical AND (also usable as &&) |
OR(Cond1, Cond2) | Logical OR (also usable as ||) |
NOT(Condition) | Logical negation |
IFERROR(Value, AltValue) | Returns alternate if expression errors |
ISBLANK(Value) | Checks if value is blank |
F. Text Functions
| Function | What It Does |
|---|---|
CONCATENATE(Text1, Text2) | Joins two strings (use & operator for more) |
LEFT(Text, N) | Returns N characters from left |
RIGHT(Text, N) | Returns N characters from right |
MID(Text, Start, N) | Returns N characters from position Start |
LEN(Text) | Returns length of string |
UPPER / LOWER / PROPER | Case transformations |
TRIM(Text) | Removes leading/trailing spaces |
SUBSTITUTE(Text, Old, New) | Replaces text within a string |
FORMAT(Value, FormatString) | Converts value to formatted text |
G. Relationship & Lookup Functions
| Function | What It Does |
|---|---|
RELATED(Column) | Fetch value from many-to-one related table |
RELATEDTABLE(Table) | Returns filtered table from one-to-many side |
LOOKUPVALUE(Result, SearchCol, SearchVal) | Lookup without a relationship |
USERELATIONSHIP(Col1, Col2) | Activates an inactive relationship |
H. Table Functions (Advanced)
| Function | What It Does |
|---|---|
SUMMARIZE(Table, GroupBy..., Name, Expr) | Groups and aggregates a table |
ADDCOLUMNS(Table, Name, Expr) | Adds computed columns to a table |
SELECTCOLUMNS(Table, Name, Expr) | Returns a subset of columns |
UNION(Table1, Table2) | Combines tables vertically |
INTERSECT(Table1, Table2) | Returns rows in both tables |
EXCEPT(Table1, Table2) | Returns rows in Table1 not in Table2 |
CROSSJOIN(Table1, Table2) | Cartesian product of two tables |
TOPN(N, Table, OrderBy) | Returns top N rows |
GENERATE(Table, TableExpr) | Expands each row with an inner table |
Technical Insight: The 3 DAX Patterns You'll Use 80% of the Time
Pattern 1 — % of Total
% of Total Sales =
DIVIDE(
[Total Sales],
CALCULATE([Total Sales], ALL(Sales)),
0
)
Pattern 2 — Year-over-Year Growth
YoY Growth % =
VAR CurrentYearSales = [Total Sales]
VAR PriorYearSales = CALCULATE([Total Sales], SAMEPERIODLASTYEAR('Date'[Date]))
RETURN
DIVIDE(CurrentYearSales - PriorYearSales, PriorYearSales, 0)
Pattern 3 — Running Total
Running Total =
CALCULATE(
[Total Sales],
FILTER(
ALL('Date'[Date]),
'Date'[Date] <= MAX('Date'[Date])
)
)
Common Mistakes
Mistake 1 — Using SUM when you need SUMX
If your measure involves per-row multiplication or division before aggregation, always use SUMX. SUM aggregates the column as-is.
Mistake 2 — Forgetting to mark the Date Table
Time intelligence functions will return errors or wrong results if your date table isn't marked. Go to Table tools → Mark as date table.
Mistake 3 — Writing nested IFs instead of SWITCH
Deep nested IF statements are unreadable and slower. SWITCH(TRUE(), ...) is the professional pattern.
Mistake 4 — Using FILTER inside CALCULATE on large tables
CALCULATE([Sales], FILTER(Sales, Sales[Region] = "North")) scans the entire table. Use CALCULATE([Sales], Sales[Region] = "North") instead — it uses the column filter directly.
Mistake 5 — Ignoring VAR for performance
Variables aren't just for readability. They're evaluated once and cached. Using [Total Sales] three times in one measure recalculates it three times. VAR x = [Total Sales] calculates it once.
Pro Tips
- Always use
DIVIDE(numerator, denominator, 0)instead of/— it handles division by zero gracefully without breaking your report. SELECTEDVALUE(Column, Default)is the clean way to get a single slicer selection. Better than writingIF(HASONEVALUE(...))every time.- Format your DAX. Use the DAX Formatter or Power BI Desktop's built-in formatter. Unformatted DAX is a professional red flag.
- Name measures with context:
Total Revenue>Revenue.Revenue LY>Last Year Rev. Your future self — and every teammate — will thank you. - Test measures in a Matrix visual with the relevant dimension on rows. It's the fastest way to validate context behavior.
Summary
DAX mastery isn't about memorizing 200 functions. It's about deeply understanding:
- Filter context — what data your measure sees
- Iterator logic — when to go row-by-row
- Time intelligence — how to shift periods correctly
- The 3 core patterns — % of total, YoY, running totals
This cheat sheet covers the 80% of DAX you'll use in 95% of real projects. Save it. Bookmark it. Use it as your reference on every build.
CTA
If this cheat sheet saved you time, imagine learning every one of these functions with real datasets, real business problems, and interview-level explanations.
That's exactly what Namste Power BI — From Basics to Interviews covers.
It's a complete, structured series built for analysts who want to go from "I know some DAX" to "I can build anything and explain it in an interview."
Start the series at devwithdata.in — free, structured, and built for working professionals.
Shashikant
· Founder, DevWithDataData professional and Power BI instructor. Building DevWithData to help analysts prove their skills, not just collect certificates.
Reading is not enough. Prove your skill.
DevWithData measures your actual ability with the Data Readiness Index. Stop reading — start practicing.
Continue Learning
The Power BI Career Roadmap — From Zero to Data Analyst in 2026
Stop learning Power BI in random order. This 26-week roadmap takes you from zero to job-ready by focusing on 5 essential stages: Foundations , Modeling/Core DAX , Advanced Design , Enterprise Service Skills, and Career Launch. Learn to master the Context Engine, write professional DAX, and build a three-project portfolio that proves your Data Readiness. Don't just follow tutorials—follow a sequence that turns you into an elite analyst at devwithdata.in.
10 min read10 Common Power BI Mistakes That Make Your Reports Wrong and Slow
These 10 mistakes cost beginners weeks of debugging. Every one is preventable if you know what to watch for — from the mega-table anti-pattern to the CALCULATE trap that produces silently wrong numbers.
5 min readStar Schema in Power BI: The Complete Guide to Dimensional Modeling
Every slow report, wrong total, and unpredictable slicer traces back to the data model. Star schema isn't a best practice — it's what Power BI's engine is literally built for. Here's how to implement it correctly.
5 min read