TGViewer
MS Excel for Data Analysis MS Excel for Data Analysis @excel_analyst ยท 73.3K subscribers
Post #1696 3.93K
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 :)
  • โค 5
More from @excel_analyst
  1. Oct 18, 2026For large or recurring comparisons, Power Query can be a better approach. ๐Ÿ”Ÿ A formula isโ€ฆ
  2. Oct 18, 2026๐Ÿ“Š Excel Interview Questions โ€” Part 4 This part focuses on advanced formulas, dynamic arraโ€ฆ
  3. Oct 17, 2026This is a practical example of combining IF, AND, and date functions. ๐Ÿ”Ÿ You receive a mesโ€ฆ
  4. Oct 17, 2026๐Ÿ“Š Excel Interview Questions โ€” Part 3 This part focuses on Power Query, PivotTables, chartโ€ฆ
  5. Oct 17, 2026๐—œ๐—•๐—  ๐—™๐—ฅ๐—˜๐—˜ ๐—ง๐—˜๐—–๐—› ๐—–๐—ข๐—จ๐—ฅ๐—ฆ๐—˜๐—ฆ ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฒ! ๐ŸŽ“ Explore IBM Cognitive Class and buildโ€ฆ
  6. Oct 16, 2026๐——๐—ฎ๐˜๐—ฎ ๐˜€๐—ฐ๐—ถ๐—ฒ๐—ป๐—ฐ๐—ฒ ๐—–๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐—ช๐—ถ๐˜๐—ต ๐—”๐—œ๐Ÿ˜ Future Ready Data Scienโ€ฆ
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 โ†’