Hi All,
I'm relatively new to Excel/PowerPivot/DAX etc., and I could really use some help. I'm trying to create a new measure using DAX to calculate the cumulative weekly average based on various product groupings. I tried using the formula below, however, it only shows the total cumulative weekly average for all the rows as show below.
Is there a way to use the SUMMARIZE function to get the cumulative weekly totals for each row? Any help would be most appreciated. Thanks in advance and Happy Holidays!
CALCULATE(SUM( 'RawData'[Dollar Sales Normalized] )/DISTINCTCOUNT('RawData'[WeekBeginning]),
FILTER(
ALLSELECTED( 'RawData') ,
'RawData'[WeekBeginning] <= MAX( 'RawData'[WeekBeginning] )
)
)
[TABLE="width: 643"]
<tbody>[TR]
[TD]Row Labels[/TD]
[TD="align: right"]10/27[/TD]
[TD="align: right"]11/3[/TD]
[TD="align: right"]11/10[/TD]
[TD="align: right"]11/17[/TD]
[TD="align: right"]11/24[/TD]
[TD="align: right"]12/1[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]$5,029[/TD]
[TD="align: right"]$4,724[/TD]
[TD="align: right"]$4,509[/TD]
[TD="align: right"]$4,296[/TD]
[TD="align: right"]$4,209[/TD]
[TD="align: right"]$4,086[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]$5,029[/TD]
[TD="align: right"]$4,724[/TD]
[TD="align: right"]$4,509[/TD]
[TD="align: right"]$4,296[/TD]
[TD="align: right"]$4,209[/TD]
[TD="align: right"]$4,086[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]$5,029[/TD]
[TD="align: right"]$4,724[/TD]
[TD="align: right"]$4,509[/TD]
[TD="align: right"]$4,296[/TD]
[TD="align: right"]$4,209[/TD]
[TD="align: right"]$4,086[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]$5,029[/TD]
[TD="align: right"]$4,724[/TD]
[TD="align: right"]$4,509[/TD]
[TD="align: right"]$4,296[/TD]
[TD="align: right"]$4,209[/TD]
[TD="align: right"]$4,086[/TD]
[/TR]
[TR]
[TD]Grand Total[/TD]
[TD="align: right"]$5,029[/TD]
[TD="align: right"]$4,724[/TD]
[TD="align: right"]$4,509[/TD]
[TD="align: right"]$4,296[/TD]
[TD="align: right"]$4,209[/TD]
[TD="align: right"]$4,086[/TD]
[/TR]
</tbody>[/TABLE]
I'm relatively new to Excel/PowerPivot/DAX etc., and I could really use some help. I'm trying to create a new measure using DAX to calculate the cumulative weekly average based on various product groupings. I tried using the formula below, however, it only shows the total cumulative weekly average for all the rows as show below.
Is there a way to use the SUMMARIZE function to get the cumulative weekly totals for each row? Any help would be most appreciated. Thanks in advance and Happy Holidays!
CALCULATE(SUM( 'RawData'[Dollar Sales Normalized] )/DISTINCTCOUNT('RawData'[WeekBeginning]),
FILTER(
ALLSELECTED( 'RawData') ,
'RawData'[WeekBeginning] <= MAX( 'RawData'[WeekBeginning] )
)
)
[TABLE="width: 643"]
<tbody>[TR]
[TD]Row Labels[/TD]
[TD="align: right"]10/27[/TD]
[TD="align: right"]11/3[/TD]
[TD="align: right"]11/10[/TD]
[TD="align: right"]11/17[/TD]
[TD="align: right"]11/24[/TD]
[TD="align: right"]12/1[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]$5,029[/TD]
[TD="align: right"]$4,724[/TD]
[TD="align: right"]$4,509[/TD]
[TD="align: right"]$4,296[/TD]
[TD="align: right"]$4,209[/TD]
[TD="align: right"]$4,086[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]$5,029[/TD]
[TD="align: right"]$4,724[/TD]
[TD="align: right"]$4,509[/TD]
[TD="align: right"]$4,296[/TD]
[TD="align: right"]$4,209[/TD]
[TD="align: right"]$4,086[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]$5,029[/TD]
[TD="align: right"]$4,724[/TD]
[TD="align: right"]$4,509[/TD]
[TD="align: right"]$4,296[/TD]
[TD="align: right"]$4,209[/TD]
[TD="align: right"]$4,086[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]$5,029[/TD]
[TD="align: right"]$4,724[/TD]
[TD="align: right"]$4,509[/TD]
[TD="align: right"]$4,296[/TD]
[TD="align: right"]$4,209[/TD]
[TD="align: right"]$4,086[/TD]
[/TR]
[TR]
[TD]Grand Total[/TD]
[TD="align: right"]$5,029[/TD]
[TD="align: right"]$4,724[/TD]
[TD="align: right"]$4,509[/TD]
[TD="align: right"]$4,296[/TD]
[TD="align: right"]$4,209[/TD]
[TD="align: right"]$4,086[/TD]
[/TR]
</tbody>[/TABLE]