Forum Discussion
Greg_Deckler
Community Champion
10 years agoDealing with Measure Totals
This one has come up quite a bit recently. The issue surrounds using Measures in Table visualizations with a Total row. The complaint is that the "Total" row is "wrong" for the measure. Technically, ...
Anonymous
4 years agoNot applicable
Good Morning.
I'm also having a similar problem in that the total for the measure i've created isn't adding up
I have tried adding the "IsFiltered" and "SUMX" functions within my measurement however so far haven't had success (the measurement does contain switch statements too) can you possibly advise? The DAX I'm using for the original measurement is below,
Measure = IF(MAX('Core Data'[Change Impact Size (Major/Medium/Minor/Cosmetic])="Major",
IF(COUNT('Core Data'[Change Impact Size (Major/Medium/Minor/Cosmetic])>1,13,
SWITCH(
DATEDIFF(max('Core Data'[Go Live Date]),max('Date Table'[Date]),WEEK)
, -12,1,-11,2,-10,3,-9,4,-8,5,-7,6,-6,8,-5,10,-4,10,-3,10,-2,11,-1,12,0,12,1,12,2,12,3,12,4,12,5,11,6,10,7,9,8,8,9,7,10,6,11,4,12,2)
)
,
IF(max('Core Data'[Change Impact Size (Major/Medium/Minor/Cosmetic])="Medium",
IF(COUNT('Core Data'[Change Impact Size (Major/Medium/Minor/Cosmetic])>1,13,
SWITCH(
DATEDIFF(max('Core Data'[Go Live Date]),max('Date Table'[Date]),WEEK)
, -12,0,-11,1,-10,2,-9,3,-8,4,-7,5,-6,7,-5,8,-4,8,-3,8,-2,9,-1,10,0,10,1,10,2,10,3,10,4,9,5,9,6,8,7,7,8,6,9,5,10,4,11,2,12,1))
,
IF(max('Core Data'[Change Impact Size (Major/Medium/Minor/Cosmetic])="Minor",
IF(COUNT('Core Data'[Change Impact Size (Major/Medium/Minor/Cosmetic])>1,13,
SWITCH(
DATEDIFF(max('Core Data'[Go Live Date]),max('Date Table'[Date]),WEEK)
, -12,0,-11,0,-10,0,-9,1,-8,2,-7,3,-6,4,-5,5,-4,6,-3,7,-2,7,-1,8,0,8,1,8,2,8,3,7,4,6,5,6,6,5,7,4,8,3,9,2,10,1,11,0,12,0))
)))