logo
For Power BI
  • Products
    • Custom Visuals for Power BI
    • Report Templates
  • Resources

      Resources

    • Documentation
    • Report Examples
    • Blog
    • Webinars
    • Video Tutorials
    • Visuals Gallery

    Support

    • ZoomCharts Assistance
    • Contact Sales
    • Contact Support
    • FAQ

    Challenges

    Challenges

    Improve your report creation skills by participating in free challenges for report creators.

    Learn more
    Get Developer License
  • Services
    • Power BI Report Development
    • Custom Visual Development
  • Challenges
  • Pricing
Request a quote Get Developer License Sign in
Request a quote Book a Demo Get Developer License Sign in
Get it now
Go back

Contents

Blog Powerbi Tutorials 12 Essential Power BI DAX Formulas Every Report Creator Should Master

Jul 31, 2025

12 Essential Power BI DAX Formulas Every Report Creator Should Master

These are twelve DAX formulas that every Power BI report creator must know to create better reports - with examples, use cases and tips. 

Title image
Title image

These are twelve DAX formulas that every Power BI report creator must know to create better reports - with examples, use cases and tips. 

Contents

Share this article

DAX is what separates a Power BI report that displays data from one that answers questions. These twelve formulas are the ones every report creator relies on daily, covering conditional calculations, safe division, row-by-row aggregation, and multi-tier bucketing. Each one includes syntax, a real example, and the exact use cases where it earns its place.

Power BI gives you the platform. DAX gives you the precision. By mastering these expressions you will be able to perform advanced calculations across rows and tables, organize and transform data without touching the source, and deliver more focused and valuable insights to your users.

For deeper DAX learning, these resources are worth bookmarking:

  • dax.guide: complete reference of all DAX functions with syntax and examples
  • Microsoft Learn DAX Reference: official documentation
  • 27 Best Power BI Training Resources: guides, courses, and YouTube channels recommended by ZoomCharts
All 12 formulas at a glance
Formula What it does in one line
CALCULATE Evaluate any expression within a new filter context
SUMX Sum a calculated value across every row in a table
ALL Remove all filters and return the grand total
DIVIDE Divide safely with a fallback for zero-denominator errors
ADDCOLUMNS Add new calculated columns to an existing table
SELECTCOLUMNS Create a new table with only the columns you need
SUMMARIZE Group and aggregate data into a summarized table
FILTER Return only the rows that match a condition
RELATED Pull a value from a related table into the current one
IF Return one of two values based on a true/false condition
SWITCH Handle multiple conditions without nesting IF statements
RANKX Assign a rank to each row based on a measure value

Top 12 Essential DAX Formulas

CALCULATE: The Brain of DAX

Change the filter context of any expression

Most important
CALCULATE([expression], [filter1], [filter2])

What it does

CALCULATE changes the context of a calculation. Think of it as saying "Do this, but only for specific data." It evaluates your expression (like SUM, DIVIDE, etc.) but within a new filter condition. Nearly every advanced DAX measure relies on CALCULATE at some level.

Example

Your report shows global sales, but you need to limit the data to Europe. CALCULATE evaluates the sum of Sales[Amount] but only for rows where Sales[Region] is "Europe".

CALCULATE measure example in Power BI DAX

Use cases

  • Region-specific KPIs
  • Time-based data (e.g. "last 30 days")
  • Time intelligence (e.g. comparing current vs. same period last year)
  • Customer segmentation (e.g. "VIP Clients", "New Users")

SUMX: Add Calculated Values Across Rows

Row-by-row evaluation before summing

Iterator
SUMX([table], [expression])

What it does

Whereas SUM calculates the total of a single existing column, SUMX goes row by row to evaluate an expression across one or multiple columns, then adds all the results together. Use it when the value you need to sum does not exist as a column yet.

Example

Your data has Sales[Quantity] and Sales[Unit Price] but no revenue column. SUMX multiplies them per row then sums all results to give you total sales amount.

SUMX example in Power BI DAX

Use cases

  • Calculate totals across multiple columns (e.g. sales revenue per product line)
  • Determine profit (revenue minus expenses per row)
  • Use with ALL to see totals even on filtered tables
  • Apply varying tax rates per row before summing

ALL: Ignore Filters

Always return the grand total regardless of slicers

Filter modifier
ALL([table])

What it does

When you always need the total column value, ALL ensures that filters or slicers are ignored and your measure returns the grand total across all rows, regardless of what the user has selected on the page.

Example

Inside a CALCULATE expression, ALL ensures you always see the total global sales amount even when the user filters to a specific region or product. Useful for KPI cards or as the denominator in a percentage-of-total measure.

DAX measure with ALL example in Power BI

Use cases

  • Calculate percentage of total
  • Show baseline figures in KPI cards
  • Normalize values across categories

DIVIDE: Safe Division Between Two Values

Never break a visual with a divide-by-zero error

Error-safe
DIVIDE([numerator], [denominator], [fallback value])

What it does

Divides one number by another. When the denominator is zero, NaN, or missing, it returns a fallback value instead of a divide-by-zero error, keeping your visuals clean and your users unconfused.

Example

Calculating Average Order Value by dividing Sales[Amount] by Sales[Quantity]. When a row has no sales, instead of breaking the visual the fallback value is returned. Using "No Data" rather than 0 signals missing data rather than zero revenue, which matters for the accounting department.

DIVIDE example in Power BI DAX

4U Reports connection

DIVIDE is the foundation of the Budget Variance %, Maverick Spend Rate, and On-Time Delivery Rate measures in the 4U Procurement Report. See the full DAX implementation there.

Use cases

  • KPI completion percentages
  • Conversion rates
  • Metrics like Customer Acquisition Cost, ARPU (read more)

ADDCOLUMNS: Add New Columns to a Table

Extend an existing table with calculated columns

Table function
ADDCOLUMNS([table], "new column name", [expression], ...)

What it does

Adds new calculated columns to an existing table. Unlike measures which perform on-the-fly calculations, ADDCOLUMNS columns are permanent parts of the table calculated row by row.

Example

Your Sales table has Sales[Cost] and Sales[Amount]. To show profit per sale, ADDCOLUMNS creates a "Profit" column subtracting Cost from Amount:

ADDCOLUMNS(Sales, "Profit", Sales[Amount] - Sales[Cost])

Use cases

  • Extract new insights from existing data
  • Add calculated columns without affecting the original table

SELECTCOLUMNS: Create a New Table with Just the Fields You Want

Reduce a wide table to only what you need

Table function
SELECTCOLUMNS([table], "new column name", [expression], ...)

What it does

Similar to ADDCOLUMNS but creates a brand-new table containing only your selected columns, copied as-is or with expressions applied. Useful for simplifying a wide table without modifying the original.

Example

Your Sales table has 30 columns but you only need Customer ID and Amount. SELECTCOLUMNS creates a two-column table.

Power BI SELECTCOLUMNS example in DAX

Use cases

  • Simplify data and optimize query performance
  • Transform data without affecting the original table
  • Create lookup or reference tables
  • Control which data is exposed in a view

SUMMARIZE: Create New, Summarized Tables

Group data and reduce query size for better performance

Performance
SUMMARIZE([table], [category column], "summary column name", [expression])

What it does

Groups your data using one or more category columns and creates a new table with only summarized values. If you have used pivot tables in Excel this will feel familiar. Essential for simplifying your data model and improving report performance.

Example

Your fact table has a row per purchase. You want a summarized table showing average product sale price per country to inform pricing strategy. SUMMARIZE groups by Sales[Country] and applies DIVIDE to calculate the average.

Power BI DAX SUMMARIZE example

Use cases

  • Simplifying data and optimizing queries
  • Visualizing category-based insights (total revenue per country, units per brand)

FILTER: Keep Only the Rows You Want

Return a table containing only rows that match a condition

Table function
FILTER([table], [condition])

What it does

Returns a filtered version of a table keeping only rows where the condition is true. All columns from the original table are preserved but only for the matching rows.

Example

To create a table of only high-paying customers, FILTER keeps only rows where Sales[Amount] exceeds $500. You can also match text: Sales[Country] = "United States".

Power BI DAX FILTER example

Use cases

  • Filter by value condition (high-paying customers, risk groups)
  • Filter by category (region, country, brand, demographic)
  • Filter to a specific time period

RELATED: Pull Data from Linked Tables

Reference a column from a related table

Relationship
RELATED(table[column])

What it does

When your data model has relationships between tables, RELATED fetches a value from a related table into the current one based on the defined relationship. Essential for multi-table data models.

Example

Customer data (region, country, name) lives in a dimension table. You want to FILTER your sales fact table to only rows where the customer is in Asia. RELATED lets you reference Customers[Region] inside the FILTER condition on the Sales table.

Power BI DAX RELATED example

Use cases

  • Enrich fact tables with dimension data
  • Display additional details in tooltip fields
  • Use inside FILTER, SELECTCOLUMNS, or CALCULATE

IF: Do "This" or "That"

Return one of two values based on a condition

Conditional
IF([condition], [outcome if true], [outcome if false])

What it does

IF statements are the cornerstone of almost any programming language, and DAX is no exception. It checks each value against your condition and returns one result if the condition is met, another if it is not.

Example

Tag each sale as "High" or "Low" based on its value: if above $250 it is high, otherwise low. IF checks each row and returns the correct label.

Power BI DAX IF example

Use cases

  • Labels, tooltip fields, simple alerts
  • Gauge or pie chart categories (e.g. % of sales above $250)
  • Conditional formatting (green/red based on condition)

SWITCH: Multi-Condition IF

Handle multiple conditions without nested IF statements

Conditional
SWITCH([expression], [condition1], [outcome1], [condition2], [outcome2], ..., [else])

What it does

When you need more than two outcomes, SWITCH lets you stack multiple conditions and outputs in a single clean expression, with no nested IF statements required.

Example

Instead of two tiers (IF), SWITCH creates four: "Very High" above $500, "High" from $251 to $500, "Medium" from $101 to $250, and "Low" for everything else. You can use other operators beyond "more than", including exact matching with "=".

Power BI DAX SWITCH example

Use cases

  • Bucketing (pricing tiers, risk groups, performance levels)
  • Labels and tooltip fields with more than two options
  • Conditional formatting based on numeric or text values

RANKX: Rank Items by Value

Assign a rank number to each row based on a measure

Ranking
RANKX([column], [expression])

What it does

RANKX assigns a rank to each row based on the value of a given measure, starting from 1 for the largest value. Useful for leaderboards, custom sort orders, and top-N filtering.

Example

You want to know which countries have the most total sales. RANKX assigns a rank per country based on Sales[Total Sales], letting you sort to see a leaderboard of best-performing markets. You can also add the rank measure to a Combo PRO Series field for custom chart sorting.

Power BI RANKX DAX example

Use cases

  • Leaderboards and rank display in tooltip fields
  • Custom sort order for table rows and column charts
  • Top-N or bottom-N filtering

From DAX Measures to Reports People Actually Use

These twelve essential DAX formulas are the foundation of every meaningful Power BI report. With them you can filter by context, calculate across rows, handle missing data safely, and bucket values into categories users can act on.

But measures alone do not make a report people use. The next step is designing visuals that surface those measures in a way that earns adoption, where users explore by clicking rather than configuring and where insights are visible without requiring a new page for every question.

See these measures applied in real 4U Reports
 
4U Procurement Report
CALCULATE, DIVIDE, and SUM applied to maverick spend, budget variance, and delivery performance
 
4U Executive KPI Report
CALCULATE with polarity-aware variance logic across 10 KPIs and 34 markets
 
4U Reports: the full framework
The design principles that turn DAX measures into reports that earn adoption

With Drill Down Visuals by ZoomCharts you get seamless cross-filtering, multi-level drill-down, and full customization, so the measures you have just learned power reports that users actually open.

Power BI interactive report with ZoomCharts visuals


Frequently Asked Questions

What is the most important DAX formula in Power BI?

CALCULATE is widely considered the most important DAX formula in Power BI. It changes the filter context of any expression, which means almost every advanced measure (time intelligence, segment comparison, running totals) relies on it at some level. Understanding CALCULATE unlocks the full power of DAX.

What is the difference between SUM and SUMX in Power BI DAX?

SUM adds up all values in a single existing column. SUMX evaluates an expression row by row across a table and then sums the results, which means it can calculate values that do not exist as a column yet, such as multiplying quantity by unit price before summing. Use SUM for simple column totals and SUMX when you need to calculate something per row first.

What is DAX in Power BI?

DAX (Data Analysis Expressions) is the formula language used to perform calculations and transform data in Power BI. Think of it as Excel formulas but more powerful, operating across entire tables and responding dynamically to filters and slicers in your report.

What is the difference between DAX measures and calculated columns?

Measures return values on-demand when a visual requests them and respond to the current filter context. Calculated columns exist as permanent parts of the table and are evaluated on report load row by row. Use measures for aggregations and KPIs, use calculated columns for row-level labels or categories.

How do I create a DAX measure in Power BI?

Click the New Measure button in the Home tab of Power BI Desktop's top ribbon, or right-click in the Data pane and select New Measure. A formula bar opens where you enter your DAX expression. For a calculated column instead, select New Column from the same menu.

How to create a new DAX measure in Power BI Desktop

How do I calculate a percentage in Power BI with DAX?

Use DIVIDE: provide the first value as numerator and the second as denominator. The result is a decimal (e.g. 150 / 200 = 0.75). In the Format section of the top ribbon, set the format to Percentage and 0.75 becomes 75%. Always use DIVIDE instead of the "/" operator to avoid divide-by-zero errors.

Power BI calculate percentage with DAX measure


Related Content

  • 9 Best Power BI DAX Training Courses
  • 27 Best Power BI Training Resources
  • Filters in Power BI: Everything You Need to Know
  • How to Build a 4U Procurement Report in Power BI
  • How to Build 4U Executive KPI Reports
envelope icon

Want more info like this?

Subscribe to our newsletter and be the first to read our latest articles and expert data visualization tips!


Find out more

Apr 22, 2026

Blog Thumbnail
Tutorials
Data visualization

How to Build a 4U Procurement Report in Power BI

Procurement data is some of the most decision-critical data an organization holds. It touches budgets, supplier relationships, delivery risk, and compliance, all at once. Yet most procurement reports get built the same way: tables of spend, a few bar charts, and a handful of slicers. Users open them, feel overwhelmed, and go back to spreadsheets.

Apr 13, 2026

Blog Thumbnail
Tutorials
Data visualization

How to Build 4U Executive KPI Reports

Any developer can publish a report. But building a report that executives actually open, navigate confidently, and use to make decisions requires a different approach. This guide walks through how to apply the 4i principles in Power BI and achieve 4U Reports, using a real executive KPI dataset as a working example.

Apr 08, 2026

Blog Thumbnail
Data visualization

4U Reports: Unique, User Friendly, Uncovering, Understandable

Most organizations have invested heavily in business intelligence tools, data platforms, and analytics teams. Yet the reports go unused, and decisions are still made based on intuition and speculation. 4U Reports are built to close that gap by putting user experience at the center of every reporting decision.

Mar 24, 2026

Blog Thumbnail
Product updates

March Update: Dynamic Thresholds and Filtering From Legend Categories

This product update focuses on two key improvements: 1. dynamic thresholds that adapt automatically to data context 2. More precise interaction through subcategory selection

Mar 02, 2026

Blog Thumbnail
Product updates

February Update: Breadcrumbs, Multiple Change Thresholds and Full Tooltip Styling Control

This release focuses on something our users care about deeply: reducing manual work and improving report clarity. We improved the way analysts build reports and how users understand them. Here’s what’s new.

Feb 12, 2026

Blog Thumbnail
Power BI tutorials

How to Explore Power BI Data Without Adding More Report Pages

Most Power BI developers improve their reports by adding more: more pages, more slicers, more drill-through pages, more bookmarks. It rarely works. Users still ask for Excel exports. Stakeholders still request new pages for every new question. This guide explains why the solution is not more pages but better visuals — and walks through five practical steps to enable deeper data exploration inside the same Power BI canvas, without expanding your report footprint.
  • 1
  • 2
  • 3
  • 4
  • 5
  • ...
  • 15
  • »

Contents

Share this article

Want more info like this?

Subscribe to our newsletter and be the first to read our latest articles and expert data visualization tips!


Thank you!

Check your inbox to verify your email address.

logo
[email protected]
+44 204 577 3993
logo

Products

Drill Down Bubble PRO Drill Down Line PRO Drill Down Network PRO Drill Down Waterfall PRO Drill Down Graph PRO Drill Down Combo PRO Drill Down Combo Bar PRO Drill Down Donut PRO Drill Down Pie PRO Drill Down TimeSeries PRO Drill Down Timeline PRO Drill Down Map PRO Drill Down Scatter PRO All Visuals

Resources

Report Examples Webinars Blog ZoomCharts Academy Visuals Gallery Documentation Custom Visual Development Subscribe to News

Solutions

Custom Visual Development

Company

Pricing About Us Partners Leave feedback Join PowerGroup EU Funding

Help

ZoomCharts Assistance Contact Sales Contact Support FAQ AI Information

Drill Down Line PRO Drill Down Bubble PRO Drill Down Network PRO Drill Down Waterfall PRO Drill Down Graph PRO Drill Down Combo PRO Drill Down Combo Bar PRO Drill Down Donut PRO Drill Down Pie PRO Drill Down TimeSeries PRO Drill Down Timeline PRO Drill Down Map PRO Drill Down Scatter PRO All Visuals

Report Examples Webinars Blog ZoomCharts Academy Visuals Gallery Documentation Custom Visual Development Subscribe to News

Custom Visual Development

Pricing About Us Partners Leave feedback Join PowerGroup EU Funding

ZoomCharts Assistance Contact Sales Contact Support FAQ AI Information
+44 204 577 3993
[email protected]

Ready to get in touch?

Contact our experts with any question about Power BI and ZoomCharts for Free!

Contact us

© 2026, Data Visualization Software Lab

U.S. Patents No. 11,645,343; 11,921,804; 12,346,389

Cookies
Privacy Policy
Global
Legal
Patent
warning

Error message

success

Success info: Done!

ZoomCharts AI Assistant

We noticed you're using an old OS version.

For the best experience, we recommend upgrading to ensure that all website features display correctly.

Cookie settings

We use necessary cookies for site functionality, as well as statistic, marketing, and preference cookies to enhance your experience. For more information and to manage your preferences, please visit our Cookie policy