Hi Learners,
In this video, I have introduced the CALCULATE and CALCULATETABLE command. These two commands are the most important command in DAX.
You will get an understanding of how the CALCULATE and CALCULATETABLE works and how they can modify the fitler context.
I have explained the working demo using measures. To know more, please watch this video.
Important point to consider are as below:
CALCULATE and CALCULATETABLE are the only commands which can create a new filter context or change an existing filter context.
Filter Context filters a table indirectly as the filter context works on the whole model.
CALCULATE accepts any number of arguments. First argument in mandatory, which is the expression to evaluate. The argument s from second are called filter arguments.
CALCULATE creates a new filter context based on the combination of filter arguments.
Once the CALCULATE finishes creating the new filter context based on the filter arguments (starting from second argument), it is applied to the whole model and then the first argument is computed.
We can say that CALCULATE creates a new filter context by modifying the filters in the existing(current) filter context.
Same rules apply to CALCULATETABLE also, The only difference is that CALCULATE returns a scalar value and CALCULATETABLE returns a table. CALCULATETABLE can be used to create a calculated table or an intermediate table while creating a measure, in order to compute the scalar value.
To learn the evaluation context from beginning, please visit the link - https://www.youtube.com/watch?v=Jf7hz...
To learn about Row context, please visit the link - • 9 - Evaluation Context - Row Context
To learn about Filter context, please visit the link - • 8 - Evaluation Context - Filter Context
To learn more about DAX and Power BI and to get the latest videos, please subscribe to our channel ML For Analytics.
/ mlforanalytics
To know more about our blog and the topics related to business intelligence and data science, please visit the following link:
https://mlforanalytics.com/