Forum Discussion
Anonymous
8 years agoNot applicable
Sum moving by week groups
Hello, I am looking for a help with creation of calculated table which contains Orders data(multiple measures) aggregated by 13 weeks back. Please see an example of one of these calculation below: ...
- 8 years ago
Hey,
maybe this measure gives you an idea:
Moving Sum =
CALCULATE(
SUM('Fact'[Value])
,FILTER(ALL('Calendar')
,'Calendar'[RunningPeriod] <= MAX('Calendar'[RunningPeriod]) && 'Calendar'[RunningPeriod] >= MAX('Calendar'[RunningPeriod]) - 1))Just replace the table names, replace the column reference "RunningPeriod" by your columnname WeekYear and the step by number of weeks.
This should do the trick.
Regards
Tom
TomMartens
8 years agoSuper User
Hey,
maybe this measure gives you an idea:
Moving Sum =
CALCULATE(
SUM('Fact'[Value])
,FILTER(ALL('Calendar')
,'Calendar'[RunningPeriod] <= MAX('Calendar'[RunningPeriod]) && 'Calendar'[RunningPeriod] >= MAX('Calendar'[RunningPeriod]) - 1))
Just replace the table names, replace the column reference "RunningPeriod" by your columnname WeekYear and the step by number of weeks.
This should do the trick.
Regards
Tom