How To Differ CALCULATETABLE Over FILTER In DAX — DAX in Power BI — Chapter 10

CALCULATETABLE is more applicable for context transition requirement.

Arpita Ghosh
Geek Culture

--

Photo by Scott Graham on Unsplash

DAX has a different set of functions to manage tables. In this blog, we are going to explore CALCULATETABLE() function. This function helps create and manage tables.

Based on Microsoft documentation, the CALCULATETABLE function evaluates a table expression in a modified filter context.

CALCULATETABLE is the same as CALCULATE function, the difference is in their output. CALCULATETABLE returns a table whereas CALCULATE returns a single value like an integer or a string.

It’s time to understand deeply with some example.

Get Data

For this case study, I consider the US Superstore dataset from Kaggle.

I have considered the code from one of my case study (How to Create Dimensional Queries and Decomposition Tree).

If you want to get that file, please check the GitHub (US_Superstore_Decomposition Tree project) location.

Syntax of CALCULATETABLE()

Syntax is following

--

--