Most people pick up Power BI visuals in a few days. Then they hit DAX. A simple total works, but the moment they try year-on-year growth or a percentage of total, the numbers look wrong and nobody can explain why. If you are wondering how to learn DAX formula writing without getting lost, this beginner roadmap is for you.
Below you will find what DAX is, the core concepts in the right order, the DAX functions every beginner should know with real examples, a week-by-week learning plan, practice projects and the mistakes that slow most learners down.
Quick answer: To learn DAX, first build a clean data model (star schema and a date table), then learn in this order: basic measures (SUM, COUNTROWS, DIVIDE) → calculated columns vs measures → filter context and row context → CALCULATE → iterators such as SUMX → time intelligence → variables. Practise every concept on a real dataset. With about an hour a day, most beginners are comfortable with everyday DAX in 4–6 weeks.
Table of Contents
What Is DAX in Power BI?
DAX (Data Analysis Expressions) is the formula language used in Power BI, Excel Power Pivot and Analysis Services. You use it to create measures, calculated columns and calculated tables: the numbers that power your dashboards, such as total sales, profit margin, year-to-date revenue or customer rank.
DAX looks a lot like Excel formulas, and many function names are the same (SUM, IF, AVERAGE). The big difference is that Excel formulas work on cells, while DAX works on tables and columns and responds to whatever filters a user selects in a report. That one idea, called evaluation context, is what makes DAX powerful and what makes it confusing at first.
| Excel formulas | DAX formulas | |
|---|---|---|
| Works on | Cells and ranges (A1:A100) | Tables and columns (Sales[Amount]) |
| Result | Fixed value in one cell | Changes with slicers, filters and visuals |
| Example | =SUMIFS(C:C, A:A, "Jaipur") | Total Sales = SUM(Sales[Amount]) |
| Key idea | Cell references | Filter context |
Before You Start: Prerequisites for Learning DAX
Many beginners struggle with DAX not because DAX is hard, but because their data model is messy. Get these basics right first:
- Excel comfort: IF, SUMIFS, XLOOKUP and pivot tables. If you are unsure, read Excel vs Power BI: which should you learn first?
- Power BI basics: loading data, Power Query cleaning and building simple visuals
- A star schema: one fact table (for example Sales) connected to dimension tables (Products, Customers, Date) with one-to-many relationships
- A proper date table: one row per day, marked as a date table, and related to your fact table
A quick way to create a date table with DAX:
Date =
ADDCOLUMNS (
CALENDARAUTO (),
"Year", YEAR ( [Date] ),
"Month", FORMAT ( [Date], "MMM" ),
"Month Number", MONTH ( [Date] )
)After creating it, use Mark as date table in Power BI Desktop and relate Date[Date] to the date column in your Sales table.
Core DAX Concepts to Learn in the Right Order
1. DAX syntax basics
Every DAX formula has a name, an equals sign and an expression. Columns are written as Table[Column], and measures are referenced in square brackets like [Total Sales]. Use line breaks and indentation to keep longer formulas readable.
2. Calculated columns vs measures
This is the first big decision in DAX, and getting it wrong is the most common beginner mistake.
| Calculated column | Measure | |
|---|---|---|
| Calculated | Once per row, when data refreshes | On the fly, for each visual and filter |
| Stored in model | Yes, uses memory | No |
| Responds to slicers | No | Yes |
| Use for | Categories, row-level labels, slicer fields | Totals, ratios, KPIs, anything aggregated |
| Example | Sales[Line Total] = Sales[Quantity] * Sales[Unit Price] | Total Sales = SUM(Sales[Amount]) |
Rule of thumb: if you will put it in a slicer or on an axis, it might be a column. If you will show it as a number in a card, table or chart value, make it a measure.
3. Filter context
Filter context is the set of filters applied to a measure when it is calculated: slicer selections, the row and column of a matrix, page filters and so on. When you see Total Sales showing different values in each row of a table by city, the formula has not changed; the filter context has. Understanding this one idea makes most of DAX click.
4. Row context
Row context means “the current row”. It exists in calculated columns and inside iterator functions such as SUMX. In Sales[Quantity] * Sales[Unit Price], DAX knows which row’s quantity and price to use because of row context. Row context does not filter other tables on its own; that is what context transition with CALCULATE does, which you will learn later.
5. CALCULATE: the most important DAX function
CALCULATE evaluates an expression in a modified filter context. It lets you add, remove or replace filters, and it powers almost every advanced measure.
Jaipur Sales =
CALCULATE ( [Total Sales], Customers[City] = "Jaipur" )
% of All Products =
DIVIDE ( [Total Sales], CALCULATE ( [Total Sales], ALL ( Products ) ) )The second measure divides sales by sales with all product filters removed, giving each product’s share of the total.
6. Iterators (X functions)
Functions ending in X, such as SUMX, AVERAGEX and COUNTX, go row by row through a table, calculate an expression for each row and then aggregate the results. Use them when the value you need does not exist as a single column.
Total Revenue =
SUMX ( Sales, Sales[Quantity] * Sales[Unit Price] )SUM vs SUMX: SUM adds up one column. SUMX calculates an expression for each row first, then adds them up. This measure gives the same result as a Line Total calculated column without storing an extra column in your model.
7. Time intelligence
Time intelligence functions compare periods: year-to-date, same period last year, previous month and more. They need the date table you created earlier.
Sales YTD = TOTALYTD ( [Total Sales], 'Date'[Date] )
Sales LY =
CALCULATE ( [Total Sales], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
Sales Previous Month =
CALCULATE ( [Total Sales], DATEADD ( 'Date'[Date], -1, MONTH ) )8. Variables (VAR and RETURN)
Variables store an intermediate result so your formula is easier to read, easier to debug and often faster.
YoY Growth % =
VAR CurrentSales = [Total Sales]
VAR LastYearSales =
CALCULATE ( [Total Sales], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
RETURN
DIVIDE ( CurrentSales - LastYearSales, LastYearSales )Essential DAX Functions for Beginners (with Examples)
You do not need to memorise hundreds of functions. This short DAX functions list covers most everyday reporting:
| Category | Functions | Example use |
|---|---|---|
| Aggregation | SUM, AVERAGE, MIN, MAX, COUNT, COUNTROWS, DISTINCTCOUNT | Total sales, number of orders, unique customers |
| Logical | IF, SWITCH, AND, OR | Label orders as High / Medium / Low value |
| Math | DIVIDE, ROUND | Profit margin without divide-by-zero errors |
| Filter | CALCULATE, FILTER, ALL, ALLEXCEPT, ALLSELECTED, REMOVEFILTERS | Percentage of total, sales for one region |
| Iterator | SUMX, AVERAGEX, COUNTX, RANKX | Revenue from quantity × price, product ranking |
| Relationship | RELATED, RELATEDTABLE, USERELATIONSHIP | Bring product category into the Sales table |
| Time intelligence | TOTALYTD, DATESYTD, SAMEPERIODLASTYEAR, DATEADD | YTD sales, last year vs this year |
| Text | CONCATENATE, FORMAT, LEFT, UPPER | Dynamic titles and labels |
Five starter measures to write in your first week:
Total Sales = SUM ( Sales[Amount] )
Total Orders = COUNTROWS ( Sales )
Unique Customers = DISTINCTCOUNT ( Sales[CustomerID] )
Profit Margin % = DIVIDE ( [Total Profit], [Total Sales] )
Product Rank = RANKX ( ALL ( Products[Product Name] ), [Total Sales] )Notice that DIVIDE is used instead of the / operator. It returns a blank instead of an error when the denominator is zero, which keeps your visuals clean.
6-Week DAX Learning Roadmap for Beginners
This plan assumes about one hour of practice a day. Learn DAX step by step and do not move on until you can explain each week’s concept in your own words.
| Week | Focus | You can do this by the end |
|---|---|---|
| Week 1 | Data model, date table, syntax, basic measures (SUM, COUNTROWS, DISTINCTCOUNT, DIVIDE) | Build KPI cards for sales, orders, customers and margin |
| Week 2 | Calculated columns vs measures, IF, SWITCH, RELATED | Create category labels and choose correctly between columns and measures |
| Week 3 | Filter context, CALCULATE, ALL, ALLEXCEPT, REMOVEFILTERS | Write % of total, region-specific sales and target vs actual measures |
| Week 4 | Row context, iterators (SUMX, AVERAGEX, RANKX), FILTER | Rank products and calculate revenue from line-level data |
| Week 5 | Time intelligence: TOTALYTD, SAMEPERIODLASTYEAR, DATEADD | Build YTD, MTD, last year and YoY growth measures |
| Week 6 | Variables, context transition, debugging, performance basics | Write clean, readable measures and finish a full dashboard project |
After six weeks, continue with advanced topics such as calculation groups, USERELATIONSHIP for multiple date columns, dynamic segmentation and DAX query optimisation. These also appear in the Microsoft PL-300 Power BI Data Analyst exam.
DAX Practice Projects for Beginners
Reading DAX examples is not enough; you learn DAX by writing it on real data. Try these projects in order:
- Retail sales dashboard: total sales, orders, average order value, top 10 products with RANKX, and YoY growth by month.
- HR attrition report: headcount, attrition rate with DIVIDE, average tenure and department-wise comparison using CALCULATE.
- Budget vs actual finance report: variance, variance %, YTD actual vs YTD budget.
- E-commerce customer analysis: new vs repeat customers, customer lifetime value with SUMX, and monthly active customers.
Good free datasets include Microsoft’s Contoso and AdventureWorks samples and the sample datasets in Power BI Desktop. Want guided projects with trainer feedback? See our data analytics course with live projects in Jaipur.
Common DAX Mistakes Beginners Make
- Using calculated columns for everything: totals and ratios belong in measures, or they will not respond to slicers.
- No date table: time intelligence functions give wrong or blank results without a proper, marked date table.
- One giant flat table: DAX is designed for star schemas; a single wide table makes formulas harder and slower.
- Using / instead of DIVIDE: leads to errors and infinity values when the denominator is zero.
- Ignoring filter context: if a number looks wrong, ask “which filters are applied here?” before rewriting the formula.
- Overusing FILTER inside CALCULATE: simple column conditions such as
Customers[City] = "Jaipur"are cleaner and usually faster thanFILTER(Customers, ...). - Copying formulas without understanding them: a formula from a forum may work in someone else’s model and fail in yours.
Tools and Resources for Learning DAX
- Power BI Desktop: free, and the place to write and test every measure
- DAX query view: built into Power BI Desktop for running DAX queries and seeing table results
- DAX Studio: a free tool for testing queries and checking performance
- Performance Analyzer: shows which visuals and measures are slow
- Microsoft Learn: the official DAX function reference and free Power BI learning paths
- Copilot in Power BI: can suggest and explain DAX, but always check its output against your own understanding
- A personal DAX cheat sheet: write down each pattern you learn (YTD, % of total, rank, YoY) with an example from your own project
Self-study works for many people, but a trainer can save weeks of confusion around filter context and CALCULATE. A structured Power BI course in Jaipur gives you guided practice and someone to ask when a number does not make sense.
Why DAX Skills Matter for Data Analyst Jobs
Anyone can drag a chart onto a page. What separates a Power BI developer from a beginner is the ability to write correct, efficient DAX. In interviews for data analyst, BI analyst and Power BI developer roles, expect questions such as:
- What is the difference between a calculated column and a measure?
- Explain filter context and row context.
- What does CALCULATE do, and what is context transition?
- What is the difference between SUM and SUMX, or ALL and ALLSELECTED?
- Write a measure for year-on-year growth.
If you can answer these clearly and show a dashboard that uses them, you stand out. Strong DAX, SQL and a good portfolio also push your pay towards the higher end; see our data analyst salary in Jaipur guide.
Learn DAX at Gauri AI, Jaipur
In our Data Analytics course in Jaipur, DAX is taught step by step inside the Power BI module, after Advanced Excel and alongside data modeling, with live projects such as a Power BI sales dashboard and HR analytics report. Classes run at 2, Bhomiya Nagar, Jhotwara, or live online, with weekday, evening and weekend batches, trainers with 15 years of experience, an IBM certificate and placement assistance (support, not a guarantee).
Frequently Asked Questions
How long does it take to learn DAX?
With about an hour of practice a day, most beginners can write everyday DAX measures in 4–6 weeks. Mastering advanced topics such as context transition and optimisation takes a few months of real project work.
Is DAX hard to learn?
Basic DAX is easy, especially if you know Excel formulas. The challenging part is evaluation context. Learn filter context and CALCULATE carefully, and the rest becomes much simpler.
Do I need coding knowledge to learn DAX?
No. DAX is a formula language, not a programming language. Comfort with Excel formulas is the best preparation.
Which DAX function should I learn first?
Start with SUM, COUNTROWS, DISTINCTCOUNT and DIVIDE to build basic measures, then learn CALCULATE, the most important DAX function.
Can I use DAX in Excel?
Yes. Excel’s Power Pivot uses DAX for measures and calculated columns, so DAX skills work in both Excel and Power BI.
What is the best way to learn DAX for free?
Install Power BI Desktop, load a sample dataset, follow Microsoft Learn’s DAX modules and build one measure a day from the roadmap above. Keep notes of every pattern you learn.
Learn DAX with a trainer, not just tutorials
Master Power BI and DAX with real projects in the Gauri AI Data Analytics course, at Jhotwara or live online. Book your free demo, call +91 82096 15423 or WhatsApp us. Also read: Excel vs Power BI: Which Should You Learn First?

