Introduction
In Day 34, you created basic DAX measures like Total Sales and Total Profit.
But there is a limitation.
Those measures simply aggregate data.
They do not allow you to control how the calculation happens.
For example:
Total Sales is useful
But what if you want:
Sales only for a specific Region
Sales only for a specific Product
Profit only for high-performing products
This is where CALCULATE becomes powerful.
In Day 35, you will learn how to control calculations using filters.
What You Will Learn Today
You will understand CALCULATE function
You will apply filters inside measures
You will create filtered KPIs
You will control calculation logic
Why This Skill Matters for Your Career
CALCULATE is the most important DAX function.
In interviews, you will almost always be asked about it.
It is used for:
Conditional calculations
Business rules
Advanced KPIs
Without CALCULATE, your analysis remains basic.
Understanding the Concept in Simple Terms
CALCULATE = Change the filter context of a calculation
Example:
Instead of:
Total Sales → all data
You can say:
Total Sales → only for North region
So CALCULATE lets you define what data to consider
How This Connects to Previous Days
Day 34 → You created basic measures
Today → You control how those measures behave
Step-by-Step: Create Sales for North Region
Go to Report View
Right-click Combined_Sales → New Measure
Sales North = CALCULATE( SUM(Combined_Sales[Sales]), Combined_Sales[Region] = "North")
Test Checkpoint
Add Card visual
You should see sales only for North region
What This Means
You filtered calculation inside the measure
Step-by-Step: Create Profit for a Specific Product
Profit Laptop = CALCULATE( SUM(Combined_Sales[Profit]), Combined_Sales[Product] = "Laptop")
Test Checkpoint
Add Card
Only Laptop profit should be shown
Step-by-Step: Create High Sales Filter
High Sales = CALCULATE( SUM(Combined_Sales[Sales]), Combined_Sales[Sales] > 200000)
Test Checkpoint
Only rows with Sales > 200000 should be included
Important Understanding
CALCULATE modifies filter context
It overrides existing filters
This is what makes it powerful
Try This Yourself
Create:
Sales South
Profit for Mobile
Use:
Region = “South”
Product = “Mobile”
Check if results are correct
Common Mistakes to Avoid
Forgetting SUM inside CALCULATE
Writing incorrect column names
Using text values incorrectly (case-sensitive issues)
Confusing filters with slicers
What You Built Today
You created:
Sales for North
Profit for Laptop
High Sales measure
These are filtered KPIs
What Comes Next
Next, you will learn how to remove filters using ALL function and calculate percentages like contribution.
This is heavily used in dashboards.
Stay Connected and Keep Practicing
Blogs WhatsApp Channel (for daily quizzes and blog updates):
https://whatsapp.com/channel/0029VbCcWME4inotCWmN5511
Telegram Channel (Job Updates & Career Alerts):
https://t.me/careervalore
WhatsApp Channel (Daily Job Updates):
https://www.whatsapp.com/channel/0029Vay7sUV11ulUIhLBUI44
Conclusion
Today you learned the most powerful DAX function.
With CALCULATE, you can now control how your data is analyzed and build real business logic.
Leave a Reply