564 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owls only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
How to use the CALCULATE function in DAX measure formulae
Part one of a four-part series of blogs
The CALCULATE function is the most important one in DAX. This blog shows you how to use it to replace, remove and amend the query context for a measure (and also explains what this sentence means!).
The CALCULATE function is the heart and soul of DAX. You should read this blog carefully to make sure you understand it!
The only real way to understand the CALCULATE function is by using worked examples - which is what this blog presents.
This blog uses the following model (it's the one I used in the previous blog on basic measures):
The model used for this blog.
Here's what the CALCULATE function looks like:
Here's what the Microsoft website has to say about it:
The function calculates an expression, but with modified query context. I'll spend the rest of this blog explaining what this means!
You don't have to modify the query context (whatever that means ...). Here's an example of using CALCULATE pointlessly:
We could have just written this as =SUM('Transaction'[Quantity]), to do exactly the same thing!
This blog will show how to:
We'll start with the first item in this list: using CALCULATE to remove filters from a formula. All will become clear!
|Parts of this blog|
25 Aytoun Street