Mastering DAX in Power BI – The Ultimate Guide for Data Analysts - PART I
- Sheba Alice Prathab
- Jul 19
- 5 min read

DAX (Data Analysis Expressions) is the powerful formula language that drives calculations and analytics in Power BI. It’s the backbone for building dynamic KPIs, interactive dashboards, and complex business logic, helping you transform raw data into actionable insights.
Why Do We Need DAX in Power BI?
Power BI can connect to any dataset, but without DAX, it would only show the raw numbers. Businesses don’t just want to see plain data — they want insights. For example, they may ask:
“Show me region-wise sales.”
“What are the total sales this month?”
“Compare this year’s sales with last year.”
The raw data might simply contain a record of every sale made each day. But when a business asks for Total Sales for the month, we can’t manually add up every day’s amount. That’s where DAX comes in — it converts raw data into the insights the business needs.
Here’s a simple DAX measure for Total Sales:
Total Sales = SUM(Sales[SalesAmount]) Sales – This is the table that holds all your transaction records. Each row in this table represents a sale made on a specific day.
SalesAmount – This is the column in the Sales table where the value of each individual sale is stored.
SUM() – This DAX function adds up all the values in the SalesAmount column to give you the total sales.
So, even though your dataset just records each sale individually, this measure combines all those daily amounts into one single total. And in Power BI, it will update automatically based on any filter you apply — like a specific month, region, or year.
What is a Measure vs. a Calculated Column in DAX?
When we wrote the Total Sales formula, we created it as a Measure. But Power BI also allows you to create Calculated Columns — so what’s the difference?
1. Measure (Dynamic Calculation)
A Measure is a calculation that updates dynamically based on the filters in your report (like date, region, or product). It doesn’t store values in the table; it calculates on the fly.
Total Sales = SUM(Sales[SalesAmount])If you filter to January only, it shows January’s total.
If you select Region = West, it shows the West region’s total.
It works dynamically, based on what the user selects.
2. Calculated Column (Static Row-by-Row Value)
A Calculated Column creates a new column in your table. It evaluates each row individually and stores the result in the data model.
Sales Tax = Sales[SalesAmount] * 0.1This will create a new column called Sales Tax in your Sales table.
For every single sale row, it calculates 10% of SalesAmount and stores it.
It doesn’t change based on filters (each row’s value stays fixed).
How to Create a Measure in Power BI
Open your Power BI Desktop.
In the Fields pane, right-click on the table (e.g., Sales).
Select New Measure.
Enter your formula in the bar (e.g., Total Sales = SUM(Sales[SalesAmount])).
Press Enter — your measure will appear under the table in the Fields pane.
**The Fields pane is the sidebar in Power BI where all your tables and fields are listed for quick access.
How to Create a Calculated Column in Power BI
Open your Power BI Desktop.
In the Fields pane, right-click on the table (e.g., Sales).
Select New Column.
Enter your formula in the bar (e.g., Sales Tax = Sales[SalesAmount] * 0.1).
Press Enter — a new column is added to your table and is visible in Data View.
**The Data pane (Data View) is where you can actually see the table data row by row, along with any calculated columns you create.
So, while you right-click the table name in the Fields list to start creating them,
Measures live only as calculations (used in visuals).
Calculated Columns live inside the table (visible row by row in Data View).

What is a Filter in Power BI and Why Does It Matter for DAX?
Now that we understand what DAX is and when to use a Measure or a Calculated Column, the next important concept is the Filter — because almost every DAX calculation depends on filters.
A filter simply decides which rows of data are included in your calculation or visual. For example:
Show Total Sales for January (filter by Date)
Show Sales only for Region = West (filter by Region)
Show Average Sales for Products above $500 (filter by a condition)
Types of Filters in Power BI
In Power BI, filters control which data appears in your visuals or calculations. There are three main types you’ll use:
1. Visual Filters
When you select a chart, table, or card and apply a filter directly to it, that filter impacts only that specific visual.

2. Report and Page Filters
These are set in the Filters pane on the right-hand side:
Page Filter: Drag a field under “Filters on this page.”The filter applies to all visuals on that single page only.
Report Filter: Drag a field under “Filters on all pages.”The filter applies to every page in your report.

3. DAX-Based Filters
Filters you create inside your DAX formulas when writing a measure or calculated column.

For now, this basic understanding of filters is enough; we will deep dive into filters when we explore DAX functions in depth in upcoming blogs.
Contexts in Power BI
In Power BI, contexts are the mechanisms that determine which rows of data are included and how calculations are performed. They control how DAX formulas behave when you create columns, measures, or visuals.
Row Context – Used in Calculated Columns; evaluates each row individually, calculating values one row at a time.
Filter Context – Used in Measures; calculates based on filters applied in visuals, slicers, or DAX conditions.
Query Context – Created by visuals; groups data by fields like Region or Month and runs measures for each group in the visual.
The Eight Core Categories of DAX
Most DAX logic falls into these eight areas:
Calculation & Aggregation
Conditional Logic
Time Intelligence
Iterator Functions
Ranking & Grouping
Context Manipulation
Logical Tests & Nested Conditions
Variables & Advanced Filtering
We’ll explore each of these in detail, with examples, in our DAX series.
DAX is what transforms Power BI from a simple reporting tool into a powerful analytics platform. It allows you to calculate totals, percentages, and KPIs dynamically, handle time-based analysis, and apply complex logic to meet business needs. By understanding the difference between Measures and Calculated Columns, learning the types of filters, and knowing where to start with DAX, you now have a solid foundation to build interactive, dynamic Power BI reports.
Stay tuned as we dive into each DAX category in the next blogs. Happy DAXing!

