Forum Discussion
MrMP
Helper III
6 years agoMeasure totals incorect using IF
Hello everyone, I saw this issue many times, but I just cant seem to fix it. I am working with sales data (Product hierarchy, customers, Locations etc). Currently model has 2 calendars. One a...
- 6 years ago
Hi MrMP
You might try something like :
CALCBF_New = VAR _table = SUMMARIZE ( Table1, Table1[column], "_Value", [measure] ) RETURN IF ( HASONEVALUE ( Table1[column] ), [measure], SUMX ( _table, [_Value] ) )
amitchandak
Super User
6 years agoMrMP , In case of measures, the context of the row plays a row and the grand total are calculated again.
So when the same context is used in grand total it might miss that value and the total will not be the same.
That is why we force a total to be recalculated from row-level using values or summarize
Sumx(Values(Table[Group By]), [Measure])
Sumx(summarize( Table, Table[Group By], "_1", [Measure]),[_1])
refer these
https://www.youtube.com/watch?v=ufHOOLdi_jk
https://www.youtube.com/watch?v=Rii_6qkLNh8
https://www.youtube.com/watch?v=Ka7Ds4EAjNQ