Forum Discussion
Tiger2514555
2 years agoHelper III
Calculation Grand Total
I use this measure
Week over Week Change
i am getting the correct values row wise but when you see the Grand total of the colum measure it is wrong.
My code for measure Week over Week Change
Week over Week Change =
VAR varCurrentDate = MAX('Date'[Date])
VAR varCurrentWeek = MAX('Date'[WeekYearNumber])
VAR varPreviousWeek =
MAXX(
FILTER(
ALL('Date'[Date],'Date'[WeekYearNumber]),
'Date'[Date] = varCurrentDate - 7
),
'Date'[WeekYearNumber]
)
VAR varCurrentWeekTotal = [Grand Total]
VAR varPreviousWeekTotal =
CALCULATE(
SUM('DemandSummaryAPS'[quantity]),
'Date'[WeekYearNumber] = varPreviousWeek,
REMOVEFILTERS('Date')
)
RETURN
if(
ISBLANK(varCurrentWeekTotal),
BLANK(),
varCurrentWeekTotal - varPreviousWeekTotal
)
2 Replies
- AnonymousNot applicable
Hi Tiger2514555 ,
Here're two methods you could try.
Method 1:
Create a new measure.
New Measure= SUMX('DemandSummaryAPS', [Week over Week Change])Method 2:
Create a new measure too.
New Measure = VAR _TABLE = SUMMARIZE ( 'DemandSummaryAPS', [planCode], [Grand Total], [Week Number], "ABC", [Week over Week Change] ) RETURN SUMX ( _TABLE, [ABC] )Similar posts:
Solved: wrong column subtotals - Microsoft Fabric Community
Solved: Re: Sum of values in a measure with divide measure - Microsoft Fabric Community
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Tiger2514555Helper III
I tried and it didn't work, this is my database.