Forum Discussion
Anonymous
7 years agoNot applicable
Making a moving average backwards
Hello everyone! I Have the follow problem, I want to do a moving average backwards. for example, as the table below: Date Value 01/01/2019 10 02/01/2019 11 03/01/2019 14 04/01/2...
- 7 years ago
Hi Anonymous
You may create a measure like below:
Measure = DIVIDE ( CALCULATE ( SUM ( Table2[Value] ), FILTER ( ALL ( Table2 ), Table2[Date] >= MAX ( Table2[date] ) ) ), COUNTROWS ( FILTER ( ALL ( Table2 ), Table2[Date] >= MAX ( Table2[date] ) ) ) )Regards,
Cherie
v-cherch-msft
7 years agoMicrosoft Employee
Hi Anonymous
You may create a measure like below:
Measure =
DIVIDE (
CALCULATE (
SUM ( Table2[Value] ),
FILTER ( ALL ( Table2 ), Table2[Date] >= MAX ( Table2[date] ) )
),
COUNTROWS ( FILTER ( ALL ( Table2 ), Table2[Date] >= MAX ( Table2[date] ) ) )
)
Regards,
Cherie