Understanding the Basics of DAX
What is DAX?
DAX stands for Data Analysis Expressions. It is a formula language used in Power BI to create new insights from existing data.
DAX is to Power BI what formulas are to Excel.
Excel Formula:
=IF(A1 > 10, "Yes", "No")
DAX Formula:
= IF([Sales] > 10000, "Yes", "No")
Both perform similar logic, but DAX works on entire tables, not individual cells.
Where is DAX Used in Power BI?
| Use Case | What You Create | Example |
|---|---|---|
| New field in table | Calculated Column | Mark product as High or Low |
| Summary value | Measure | Total Sales, Avg Profit |
| Custom table | Calculated Table | Top 5 Products |
Why Do We Need DAX?
Power BI by default shows basic aggregations like sums, counts, and averages. However, real business analysis needs advanced logic.
- Show sales where profit margin is over 30%
- Group customers into Gold, Silver, Bronze
- Compare current month sales with last year
This is where DAX becomes essential.
Real-World Example
| Customer | Sales | Target |
|---|---|---|
| A | 8000 | 10000 |
| B | 12000 | 10000 |
DAX Formula:
Target Met = IF([Sales] >= [Target], "Yes", "No")
| Customer | Target Met |
|---|---|
| A | No |
| B | Yes |
What is a KPI in Power BI?
KPI (Key Performance Indicator) measures how well a goal or target is achieved.
DAX KPI Example:
KPI_Sales_Achievement = DIVIDE([Total Sales], [Sales Target])
KPIs provide quick insights using visuals like indicators, targets, and trend arrows.
DAX Is the Brain of Power BI
- Adds intelligence to reports
- Implements business logic
- Works with filters, slicers, and relationships
- Enables KPIs, comparisons, and advanced analytics

0 Comments