Forum Discussion
Debbs1976
9 years agoFrequent Visitor
Is blank giving wrong total
Hi guys,
I've got a table and I only want to show the sum of one measure if another measure is not equal to zero.
I've created a calculation...
if(
ISBLANK([COLUMN A]),
BLANK(),
sum(COLUMN B))
Now obviously the total row is greater than zero so in the column B Total it is doing a sum on ALL of the values in column B.
Is there anyway I can amend the formula to allow for the fact Grand Total should only sum what is displayed?
Any help will be greatly appreciated.
Ta
3 Replies
- AnonymousNot applicable
- SeanCommunity ChampionDAX Measure = CALCULATE ( SUM(Table[Column B]), Table[Column A] = BLANK() )
Or
DAX Measure = CALCULATE ( SUM(Table[Column B]), Table[Column A] = "" ) - v-huizhn-msftMicrosoft Employee
You’d better to add a filter in sum() function when you create a calculation based on your requirement. I create below calculated column using sample data and formula, please review it.=IF(ISBLANK(Sale[Sale Date]),BLANK(),CALCULATE(SUM(Sale[Sale ]),ALLEXCEPT(Sale,Sale[Sale Date])))
Best Regards,
Angelia