DAX Function Guide
CALCULATE
Sam McKay
CEO & Founder
How does the CALCULATE work?
CALCULATE Formula Syntax
CALCULATE(
<expression>,<filter1>,<filter2>…
)
How do you use the CALCULATE?
The CALCULATE function is such a useful tool because it changes the filter context and simplifies complex calculations with little effort, especially when used with statistical or time intelligence functions.
This function is so versatile that it is used to produce the desired outcome from simple filters to the more advanced formulas.
Related Blog Posts
Loading
Considerations when using the CALCULATE?
Filters created using the CALCULATE function will override any filters created on the canvas.
When a filter argument has the form of a predicate with a single column reference, the expression is embedded into a FILTER expression that filters all the values of the referenced column.
Related Video Tutorials
Loading
Formula examples using the CALCULATE
=( SUM(‘ResellerSales_USD'[SalesAmount_USD])) /CALCULATE( SUM(‘ResellerSales_USD'[SalesAmount_USD]) ,ALL(‘ResellerSales_USD’))
CALCULATE(AVERAGE(Website[Sessions]),Website[type]=”Organic Search”, Website[gender]=’female’)
CALCULATE(SUM(Website[Sessions],YEAR(Website[date)-1)
Related Courses
Loading