TGViewer
Data Analysis Books | Python | SQL | Excel | Artificial Intelligence | Power BI | Tableau | AI Resources Data Analysis Books | Python | SQL | Excel | Artificial Intelligence | Power BI | Tableau | AI Resources @learndataanalysis · 53.4K subscribers
Post #1714 1.56K
Power BI DAX Cheatsheet 🚀

1️⃣ Basics of DAX (Data Analysis Expressions)

DAX is used to create custom calculations in Power BI.

It works with tables and columns, not individual cells.

Functions in DAX are similar to Excel but optimized for relational data.


2️⃣ Aggregation Functions

SUM(ColumnName): Adds all values in a column.

AVERAGE(ColumnName): Finds the mean of values.

MIN(ColumnName): Returns the smallest value.

MAX(ColumnName): Returns the largest value.

COUNT(ColumnName): Counts non-empty values.

COUNTROWS(TableName): Counts rows in a table.


3️⃣ Logical Functions

IF(condition, result_if_true, result_if_false): Conditional statement.

SWITCH(expression, value1, result1, value2, result2, default): Alternative to nested IF.

AND(condition1, condition2): Returns TRUE if both conditions are met.

OR(condition1, condition2): Returns TRUE if either condition is met.


4️⃣ Time Intelligence Functions

TODAY(): Returns the current date.

YEAR(TODAY()): Extracts the year from a date.

TOTALYTD(SUM(Sales[Amount]), Date[Date]): Year-to-date total.

SAMEPERIODLASTYEAR(Date[Date]): Returns values from the same period last year.

DATEADD(Date[Date], -1, MONTH): Shifts dates by a specified interval.


5️⃣ Filtering Functions

FILTER(Table, Condition): Returns a filtered table.

ALL(TableName): Removes all filters from a table.

ALLEXCEPT(TableName, Column1, Column2): Removes all filters except specified columns.

KEEPFILTERS(FilterExpression): Keeps filters applied while using other functions.


6️⃣ Ranking & Row Context Functions

RANKX(Table, Expression, [Value], [Order]): Ranks values in a column.

TOPN(N, Table, OrderByExpression): Returns the top N rows based on an expression.


7️⃣ Iterators (Row-by-Row Calculations)

SUMX(Table, Expression): Iterates over a table and sums calculated values.

AVERAGEX(Table, Expression): Iterates over a table and finds the average.

MAXX(Table, Expression): Finds the maximum value based on an expression.


8️⃣ Relationships & Lookup Functions

RELATED(ColumnName): Fetches a related column from another table.

LOOKUPVALUE(ColumnName, SearchColumn, SearchValue): Returns a value from a column where another column matches a value.


9️⃣ Variables in DAX

VAR variableName = Expression RETURN variableName

Improves performance by reducing redundant calculations.


🔟 Advanced DAX Concepts

Calculated Columns: Created at the column level, stored in the data model.

Measures: Dynamic calculations based on user interactions in Power BI visuals.

Row Context vs. Filter Context: Understanding how DAX applies calculations at different levels.

Free Power BI Resources: https://whatsapp.com/channel/0029Vai1xKf1dAvuk6s1v22c

React with ❤️ for free cheatsheets

Share with credits: https://t.me/sqlspecialist

Hope it helps :)
  • 👍 6
  • ❤ 2
More from @learndataanalysis
  1. Sep 23, 2026✅ Types of Machine Learning Algorithms 🤖📊 1️⃣ Supervised Learning Supervised learning me…
  2. Sep 19, 2026🚀 GigaChat 3.5 Reasoning — a new open-source LLM that thinks before it answers. It breaks…
  3. Sep 16, 2026🟠 Part 12 — Dashboard Development • Dashboard layout, Tiled vs Floating, Containers, Devi…
  4. Sep 16, 2026📊 Tableau Learning Roadmap 2026 If you're starting Tableau from scratch, follow this orde…
  5. Sep 6, 2026UNPOPULAR OPINION: Excel is still relevant for data analysis. I am often asked by junior d…
  6. Aug 28, 2026✅ Power BI Basics 📊🚀 👉 Power BI is one of the most popular Business Intelligence BI too…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →