How DAX Difference between naked SUM and sum wrapped in CALCULATE

0 votes

What is the difference between naked SUM and sum wrapped in CALCULATE?

Measure1 = SUM( tab[col1]) )
Measure2 = CALCULATE ( SUM( tab[col1]) ) )
Oct 8, 2020 in Power BI by anonymous
• 10,480 points
277 views

1 answer to this question.

0 votes

This is materially different than the question you asked, because you were asking about two fully defined measures, not two snippets of DAX. The measures will behave identically, because their expansions are logically equivalent:

//Measure 1 definition:
Measure1 = SUM ( 'tab'[col1] )

// Measure 1 expands to the following, and you would use this if you were
// replacing a reference with code:
//Expansion1:
CALCULATE ( SUM ( 'tab'[col1] ) )
//Measure2 definition and expansion:
Measure2 = CALCULATE ( SUM ( 'tab'[col1] ) )

//Expansion2:
CALCULATE ( CALCULATE ( SUM ( 'tab'[col1] ) ) )
answered Oct 8, 2020 by Gitika
• 65,970 points

Related Questions In Power BI

0 votes
1 answer

How to calculate cumulative Total and % in DAX?

Hi, If your table is ready with percentage ...READ MORE

answered Mar 18, 2019 in Power BI by Cherukuri
• 33,010 points
14,263 views
0 votes
1 answer

Difference between measure and calculate column in power BI

Hi Rahul,  With calculated columns, you can add new ...READ MORE

answered May 17, 2019 in Power BI by Cherukuri
• 33,010 points
7,726 views
0 votes
1 answer

How do I calculate difference between consecutive rows and columns?

There are two ways through which you ...READ MORE

answered May 21, 2019 in Power BI by EdurekaUser
• 1,500 points
9,817 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to get month name from month number in Power BI?

You can use: MonthName = FORMAT(DATE(1, [Num], 1), ...READ MORE

answered Sep 24, 2020 in Power BI by Alisha
968 views
0 votes
1 answer

How do I count rows in one table based on values in another table using DAX?

If the tables are related, this is ...READ MORE

answered Sep 24, 2020 in Power BI by Gitika
• 65,970 points
9,245 views
0 votes
1 answer

How to ignore a slicer for one measure, but apply it on another?

In order to ignore Slicer you need ...READ MORE

answered Oct 1, 2020 in Power BI by Gitika
• 65,970 points
2,724 views
0 votes
1 answer

What is the difference between DAX and Power Query?

DAX stands for Data Analysis Expressions. DAX ...READ MORE

answered Sep 24, 2020 in Power BI by Gitika
• 65,970 points
2,247 views
0 votes
1 answer

Using DAX calculation how to calculate monthly budget till today in power bi Desktop?

You can make use of this: MTD Budget ...READ MORE

answered Sep 24, 2020 in Power BI by Gitika
• 65,970 points
412 views