📈 Power BI DAX examples
Power BI DAX examples
Copy-ready DAX formulas and business measure patterns for Power BI reports. Start with core measures, then move into filter context, iterators, time intelligence and dashboard-ready KPIs.
💡 Ideas for You
Learning resources for Power BI measures, DAX patterns and reporting.
- Step-by-step books
Start with beginner-friendly step-by-step books and learning resources from Create & Learn.
- Power BI guide
Helpful references for reports, models, visuals and Power BI workflows.
- DAX books
Books for CALCULATE, measures, filter context and business metric patterns.
- Dashboard reporting
Resources for KPI dashboards, executive reports and analytics layouts.
Some links in this section may be affiliate links. Choose only what is useful for your own work.
Browse all Power BI DAX examples
All DAX example pages are shown in one filterable grid so the selected category appears immediately below the search controls.
SUM examples
Add numeric values, usually for sales, quantity, cost or hours.
aggregationAVERAGE examples
Calculate the average value of a numeric column.
aggregationCOUNT examples
Count numeric rows in a column.
aggregationCOUNTA examples
Count non-blank rows in a column.
aggregationDISTINCTCOUNT examples
Count unique values, such as customers, orders or products.
aggregationMIN examples
Return the lowest value in a column.
aggregationMAX examples
Return the highest value in a column.
filter contextCALCULATE examples
Change the filter context of a measure.
filter contextFILTER examples
Return a filtered table for a measure or table expression.
filter contextALL examples
Remove filters from a table or column.
filter contextALLEXCEPT examples
Remove filters except for selected grouping columns.
filter contextALLSELECTED examples
Respect report selections while removing row/visual context.
filter contextREMOVEFILTERS examples
Clear filters in a cleaner CALCULATE expression.
filter contextKEEPFILTERS examples
Add filters without overriding existing filters.
filter contextVALUES examples
Return distinct visible values in the current filter context.
filter contextSELECTEDVALUE examples
Return one selected value or a fallback result.
filter contextHASONEVALUE examples
Check whether exactly one value is selected.
filter contextISFILTERED examples
Check whether a column is filtered directly.
iteratorsSUMX examples
Evaluate an expression row by row and add the results.
iteratorsAVERAGEX examples
Evaluate an expression row by row and return the average.
iteratorsCOUNTX examples
Count rows where an expression returns a non-blank value.
iteratorsMAXX examples
Return the maximum result from a row-by-row expression.
iteratorsMINX examples
Return the minimum result from a row-by-row expression.
iteratorsRANKX examples
Rank products, customers or regions by a measure.
logicIF examples
Return different results based on a condition.
logicSWITCH examples
Replace nested IF statements with clearer logic.
logicAND / OR examples
Combine multiple business conditions.
logicCOALESCE examples
Return the first non-blank expression.
logicISBLANK examples
Check whether a measure or column value is blank.
logicDIVIDE examples
Divide safely without divide-by-zero errors.
time intelligenceTOTALYTD examples
Calculate year-to-date totals.
time intelligenceDATESYTD examples
Return year-to-date dates for a measure.
time intelligenceDATEADD examples
Shift dates by days, months, quarters or years.
time intelligenceSAMEPERIODLASTYEAR examples
Compare the current period with the same period last year.
time intelligencePREVIOUSMONTH examples
Return dates from the previous month.
time intelligenceNEXTMONTH examples
Return dates from the next month.
time intelligenceDATESINPERIOD examples
Build rolling period calculations.
time intelligencePARALLELPERIOD examples
Shift a full period for comparison.
time intelligenceSTARTOFMONTH / ENDOFMONTH examples
Return the first or last date of the current month.
time intelligenceDATESBETWEEN examples
Filter calculations between two dates.
table functionsSUMMARIZE examples
Create grouped summary tables.
table functionsADDCOLUMNS examples
Add calculated columns to a table expression.
table functionsSELECTCOLUMNS examples
Create a table with selected/renamed columns.
table functionsCROSSJOIN examples
Create combinations of rows from multiple tables.
table functionsUNION examples
Append rows from tables with matching columns.
table functionsEXCEPT examples
Return rows in one table that are not in another.
table functionsINTERSECT examples
Return rows that appear in both tables.
table functionsTOPN examples
Return the top rows based on a sort expression.
relationshipsRELATED examples
Pull a value from the one-side of a relationship.
relationshipsRELATEDTABLE examples
Return related rows from the many-side of a relationship.
relationshipsUSERELATIONSHIP examples
Activate an inactive relationship inside CALCULATE.
relationshipsCROSSFILTER examples
Change filter direction for a calculation.
relationshipsTREATAS examples
Apply values from one table as filters to another.
text and formattingFORMAT examples
Convert values to formatted text.
text and formattingCONCATENATEX examples
Join values from multiple rows into one string.
text and formattingLEFT / RIGHT / MID examples
Extract parts of text values.
text and formattingCONTAINSSTRING examples
Check whether text contains a word or phrase.
business measuresRunning total examples
Create cumulative totals over time.
business measuresProfit margin examples
Calculate margin as profit divided by revenue.
business measuresYear-over-year growth examples
Compare current sales with last year.
business measuresAverage order value examples
Calculate average revenue per order.
business measuresNew customers examples
Count customers whose first purchase is in the selected period.
business measuresCustomer retention examples
Measure how many customers continue buying.
business measuresBudget vs actual examples
Compare actual performance with a budget or target.
business measuresDynamic titles examples
Create report titles that respond to slicers.