Understanding DAX: Simple Calculations That Make a Big Impact
- Latha Ramu
- Oct 11
- 4 min read
Updated: Oct 18
Introduction
When you start using Power BI, visuals are exciting — but the real magic happens when you start writing your own calculations. That’s where DAX (Data Analysis Expressions) comes in. In this post, we’ll explore a few simple yet powerful DAX measures that turn basic dashboards into insightful, interactive reports.
What Is DAX?
Data Analysis Expressions (DAX) is a powerful formula language used in tools like Power BI and Excel for creating dynamic calculations and new information from existing data. It allows you to:
Create custom calculations (called measures or calculated columns),
Perform aggregations, comparisons and time intelligence functions.
Analyze data dynamically based on filters or user selections.
Unlike basic Excel, DAX is designed to work with relational data models and business insights.
Why DAX Matters
DAX offers flexibility in creating dynamic calculations and it is built for high-performance queries, allowing for faster processing of data compared to other methods.
DAX enables you to answer sophisticated business questions that go beyond what basic visuals can show, such as calculating year-over-year growth or performing "what-if" scenario analysis.
Proficiency in DAX is a more advanced skill that takes time and effort to master, making you more valuable in the job market, especially for companies using the Microsoft ecosystems.
Without DAX, Power BI dashboards are limited to simple aggregation visuals like sums and averages of columns. With Data Analysis Expressions (DAX), you can create robust, custom calculations to generate meaningful business intelligence and produce dynamic reports such as:
Compare performance over time
Calculate ratios and KPIs
Build flexible, dynamic reports that respond to filters
Let’s look at three simple but high-impact examples.
1. Calculated Measure: Min Age
This measure calculates the minimum age from the age_years_old column in the patient_info table.
Min Age = MIN('patient_info'[age_years_old])Result:
It is a measure, so it dynamically recalculates based on the filter context in your visuals (e.g., by age, gender, department, or location).
Tip:
Use MIN() to quickly find the smallest value in a column.
Good for dashboards showing age distributions, patient demographics, or performance metrics.
Calculated Measure :Percentage / Ratio: Health Metric
This measure calculates the percentage of Gestational Diabetes Mellitus (GDM) cases among all cases.
GDM Prevalence (%) = DIVIDE([GDM Cases], [Total Cases]) * 100
Result:
DIVIDE() is used instead of / to avoid division errors if [Total Cases] is 0.
Multiplying by 100 converts the fraction into a percentage.
The result updates dynamically based on filters or slicers in your report (e.g., by year, hospital, or region).
Tip:
Use DIVIDE() for safe division to prevent errors from zero totals.
Display as a percentage in visuals (e.g., cards, tables, or KPI charts).
3.Calculated Column: BMI Category
This calculated column classifies each patient’s BMI into standard categories.
BMI Category = SWITCH(
TRUE(),
'patient_info'[current_bmi] < 18.5, "Underweight",
'patient_info'[current_bmi] >= 18.5 && 'patient_info'[current_bmi] < 25, "Normal weight",
'patient_info'[current_bmi] >= 25 && 'patient_info'[current_bmi] < 30, "Overweight",
'patient_info'[current_bmi] >= 30 && 'patient_info'[current_bmi] < 35, "Obesity Class I",
'patient_info'[current_bmi]>= 35 && 'patient_info'[current_bmi] < 40, "Obesity Class II",
'patient_info'[current_bmi] >= 40, "Obesity Class III",
BLANK())Result:
A new column BMI Category is added and it assigns each patient to a health category based on their BMI (e.g., Underweight, Normal, Overweight, Obesity I–III).
It helps quickly identify the patient’s weight status for analysis or reporting.
Tip:
Use calculated columns when you need a new column with row-level values stored in the model, especially if those values will be used for grouping and filtering or in relationships.
4. Year-over-Year Growth (YOY)
This measure calculates the Year-over-Year percentage change in expenses.
YoY % Change =
DIVIDE(
[2021_expense] - [Previous Year Value],
[Previous Year Value]
)Result:
It compares the current year’s expense (2021) with the previous year’s value to show how much it has increased or decreased.
The result tells you the percentage growth or decline in expenses compared to the previous year — a useful indicator of cost trends over time.
Tip:
Use a Date Table and time intelligence functions (like SAMEPERIODLASTYEAR) to make this formula work dynamically for any year, not just 2021.
5.1. Conditional Logic ( IF)
This calculated column or measure flags newborns based on their birth weight using IF condition
LGA Flag = IF('pregnancy_newborn'[newborn_weight] > 4.0, "LGA", "Non LGA")
Result:
If Weight > 4.0 kg , it returns "LGA" (Large for Gestational Age)
Else it returns "Non LGA"
Evaluated row by row, so each newborn gets the appropriate flag.
Tip: Use IF() for simple conditional flags and it can be combined with filters, visuals, or KPI cards to track the number of LGA babies.
5.2. Conditional Logic ( SWITCH )
This formula classifies patients into fat categories based on their Periumbilical_Visceral_Fat value.
Fat Category =
SWITCH(
TRUE(),
[Periumbilical_Visceral_Fat] < 4, "Normal",
[Periumbilical_Visceral_Fat] < 7, "Medium",
[Periumbilical_Visceral_Fat] >= 7, "High",
"Unknown"
)Result:
This formula classifies patients into fat categories based on their Periumbilical_Visceral_Fat value.
SWITCH(TRUE(), …) allows multiple conditions in a clean way, similar to nested IF statements.
Learning: Use SWITCH(TRUE(), …) when you have multiple conditional ranges — it’s cleaner than nested IFs.
Ideal for segmenting patients, customers, or products into categories.
Can be used in visuals, filters, and tooltips for better data interpretation.
Putting It All Together
You can now build a dashboard that shows:
Calculated Measure: Min Age (overall performance)
Calculated Measure: GDM Prevalence(%)
Calculated Column: BMI Category
Time Intelligence Function: YOY Growth % (trend)
Conditional Logic: IF, SWITCH (performance-based calculations)
Each of these DAX measures adds another layer of insight — transforming your dashboard from static numbers into a story of business performance to make better, data-driven decision making.
Key Takeaways
Power BI’s DAX functions allow analysts to create flexible, insightful, and interactive dashboards that go beyond simple numbers, empowering data-driven decisions across the organization.
DAX lets you create dynamic, reusable measures for deeper analysis.
Even a few simple formulas can deliver a big impact.
Begin with basic DAX calculations such as Aggregations, Calculate measures and Calculate Columns and Time Intelligence Functions like YoY Growth to understand how measures work. Once comfortable, move on to more advanced functions like FILTER, CALCULATE, and ALL, which allow you to create conditional logic and dynamic measures for deeper insights.
Conclusion
Learning DAX is one of the best investments you can make as a Power BI beginner. Mastering DAX empowers analysts to extract meaningful insights, make data-driven decisions, and build professional, interactive dashboards that communicate the story behind the data effectively.


