What Is DAX? A Beginner Guide for Power BI
DAX (Data Analysis Expressions) is the formula language Power BI uses over your model tables. Start with simple measures like SUM, put them on visuals, and watch filter context change the result.
Friends! DAX sounds heavy until you write one honest measure. Why learn it? Because charts without measures are just raw columns. How? New measure → SUM → Card → slicer. Tiny example on FreshBasket Amount. Do not worry — we walk slowly.
मित्रांनो! DAX sounds heavy until you write one honest measure. Why learn it? Because charts without measures are just raw columns. How? New measure → SUM → Card → slicer. Tiny example on FreshBasket Amount. घाबरू नका — we walk slowly.
मित्रों! DAX sounds heavy until you write one honest measure. Why learn it? Because charts without measures are just raw columns. How? New measure → SUM → Card → slicer. Tiny example on FreshBasket Amount. घबराओ मत — we walk slowly.
Quick answer
Beginner path (vertical):
- Load a clean fact table with a numeric column.
- New measure on that table.
Total Sales = SUM ( Sales[Amount] )(names must match yours).- Drop the measure on a Card.
- Add a slicer; confirm the card changes.
- Only then explore IF, CALCULATE, SUMX.
Model tables → DAX measure → visual Values → filters change the number
What do I need before this guide?
- Desktop with data loaded.
- Measures vs columns idea (guide).
- Course: What is DAX?.
Before and after (look at the tables first)
Before
आधी (Before)
पहले (Before)
After
नंतर (After)
बाद में (After)
Your first DAX measure is usually SUM ( Sales[Amount] ). Same formula; slicers change which rows it sees — Mumbai → 150.
Why DAX exists (not Excel sheet formulas)
Excel formulas live on a grid of cells (=B2+C2). DAX lives on tables and relationships.
Why you care:
- You rarely write A1-style addresses.
- You write
Table[Column]references. - Visuals bring filter context — the same measure can return different numbers when Mumbai is selected.
- That is a feature, not a bug.
Tiny table for this whole page:
| City | Amount |
|---|---|
| Mumbai | 100 |
| Pune | 40 |
DAX is the formula language over your model tables — it powers measures, calculated columns and some tables.
DAX हे formula language आहे over your model tables — it powers measures, calculated columns and some tables.
मित्रों — DAX is the formula language over your model tables — it powers measures, calculated columns and some tables.
Where you type DAX in Desktop
In Desktop you create measures from the ribbon, edit them in the formula bar, and find them under Fields with an fx icon.
Desktop मध्ये तुम्ही measures तयार करता from the ribbon, edit them in the formula bar, and find them under Fields with an fx icon.
मित्रों — In Desktop you create measures from the ribbon, edit them in the formula bar, and find them under Fields with an fx icon.
What this is: the places in Desktop where formulas live.
Why you care: if IntelliSense does not show your column, you are usually on the wrong name or wrong table.
Vertical map:
- Ribbon — New measure / New column.
- Formula bar — the editor with IntelliSense (suggestions as you type).
- Fields pane — measures appear with an fx-style marker.
- Model view — good for seeing which table owns the measure.
What you see on screen: after you create [Total Sales], Fields shows it under Sales with an fx icon.
Anatomy of a first measure — WHY SUM, WHAT happens
Measure anatomy: Name = Function ( Table[Column] ), for example Total Sales = SUM ( Sales[Amount] ).
मित्रांनो — Measure anatomy: Name = Function ( Table[Column] ), for example Total Sales = SUM ( Sales[Amount] ).
मित्रों — Measure anatomy: Name = Function ( Table[Column] ), for example Total Sales = SUM ( Sales[Amount] ).
Why use SUM
- You already have a numeric column (
Amount). - You want one total that respects slicers.
- You do not need to multiply Qty × Price first (that is SUMX later).
The formula
Total Sales = SUM ( Sales[Amount] )
Vertical breakdown:
Total Sales— measure name (what readers see unless you rename the visual).=— starts the expression.SUM— add the numbers in a column.Sales[Amount]— column reference (table then column).
What Power BI does to the rows (step by step)
- Look at the Sales table under the current filters.
- With no slicer: both rows are visible (Mumbai 100, Pune 40).
- Add Amount: 100 + 40.
- Return 140 to the Card.
- Reader selects City = Mumbai.
- Only the Mumbai row remains.
- SUM runs again → 100.
What you see on screen
- Card shows 140.
- After Mumbai slicer → Card shows 100.
- Clear slicer → 140 again.
Common first variants:
Order Count = COUNTROWS ( Sales )
Average Amount = AVERAGE ( Sales[Amount] )
What happens for COUNTROWS on our table: no slicer → 2 rows; Mumbai only → 1 row.
DAX is not only SUM
You will meet families over time:
- Aggregations — SUM, AVERAGE, MIN, MAX, COUNTROWS.
- Logic — IF, SWITCH.
- Filter modifiers — CALCULATE (next guide).
- Iterators — SUMX (separate guide).
- Time intelligence — after a Date table exists.
Do not memorise the whole function list on day one. Memorise the habit: measure → visual → slicer test.
Tiny FreshBasket classroom example (end to end)
- Table
Saleswith City + Amount (Mumbai 100, Pune 40). - Measure
[Total Sales] = SUM ( Sales[Amount] ). - Card shows 140.
- Slicer City = Mumbai → card shows 100.
- That change is filter context teaching you without a textbook.
Errors beginners see
| Message / symptom | Meaning | What to try |
|---|---|---|
| Red underline on name | Typo in table/column | Retype with IntelliSense |
| Blank card | Filters removed all rows / wrong field | Clear filters; check Data view |
| Same number everywhere | Using a column where a measure belongs | Use a measure in Values |
| Circular dependency | Measures/columns referencing badly | Simplify; avoid spaghetti |
Ravindra Bagale's Tip
Students paste 20-line DAX from the internet on day one. Write SUM yourself. Then IF. Then CALCULATE. Ownership beats copy-paste in interviews. Got it?
Ravindra Bagale's Tip – मराठी
Students दिवस एकावर internet वरून 20-line DAX paste करतात. स्वतः SUM लिहा. मग IF. मग CALCULATE. Interviews मध्ये ownership copy-paste ला हरवते. समजलं का?
Ravindra Bagale's Tip – हिंदी
Students दिन एक पर internet से 20-line DAX paste करते हैं. खुद SUM लिखो. फिर IF. फिर CALCULATE. Interviews में ownership copy-paste को हराती है. समझ में आया?
Lab
- Create
[Total Sales],[Order Count],[Average Amount]on Mumbai 100 / Pune 40 data. - Three cards on one page.
- City slicer.
- Note how each card reacts (Total Sales should go 140 → 100 for Mumbai).
- Rename measures to clear business names.
Learn it properly
Course lessons:
- What is DAX?
- DAX syntax
- Base measures for the quick commerce model
- Aggregation functions
- Logical functions
Related guides: CALCULATE & filter context · SUM vs SUMX
Excel vs DAX — one honest comparison table
| Excel habit | DAX habit |
|---|---|
=SUM(B2:B100) |
SUM ( Sales[Amount] ) |
| Filter the sheet manually | Slicers + filter context |
| Copy formula down a column | Calculated column or measure (choose carefully) |
| PivotTable cache | Model relationships + measures |
Naming discipline
- Measures:
Total Sales,Order Count— business language. - Avoid
Measure 1. - Keep table names stable (
Sales, notTable1) via Power Query rename.
Mini practice script (15 minutes)
- Create three measures: sum, average, countrows.
- Three cards.
- One slicer.
- Change slicer five times; predict the card before it renders (Mumbai → sales 100).
- Prediction practice builds filter-context instinct early.
Formula bar survival tips
- Press Enter to commit; Shift+Enter for new lines in longer formulas (version-dependent — watch the UI).
- Use IntelliSense; do not invent column names from memory.
- If the measure vanishes from Fields, you may have created it on the wrong table — check Model view home table.
- Comment sparingly with
//in longer measures later.
Readability with variables (preview)
Gross Margin % =
VAR Gross = [Total Sales] - [Total Cost]
VAR Sales = [Total Sales]
RETURN
DIVIDE ( Gross, Sales )
You do not need VAR on day one, but seeing it early removes fear when the course introduces it.
Got it? DAX = formulas on the model. Start with measures and SUM. Test with a slicer. Next: CALCULATE. Let’s continue.
समजलं का? DAX = formulas on the model. Start with measures and SUM. Test with a slicer. Next: CALCULATE. आता पुढे जाऊया.
समझ में आया? DAX = formulas on the model. Start with measures and SUM. Test with a slicer. Next: CALCULATE. आगे बढ़ते हैं.
Frequently asked questions
What does DAX stand for?
Data Analysis Expressions — Microsoft’s formula language for Power BI, Analysis Services and Power Pivot.
Is DAX the same as Excel?
Some function names look familiar (SUM, IF) but DAX works on tables and filter context, not on A1 cell addresses.
Measure vs calculated column again?
Beginners should start with measures for totals. Columns are for row-level fields.
Do I need to learn M and DAX together?
Learn enough Power Query to load clean tables, then focus DAX on measures.
Where do I see all measures?
In the Fields pane — often marked with an fx icon — and in Model view.
Next DAX topics?
CALCULATE and filter context, then SUM vs SUMX — separate guides on this site.