Forum Discussion
Anonymous
7 years agoNot applicable
Rolling Average visualisation issue Column Chart
Hi All, I have a problem with the measure of the 3mth rolling average to visualise it correctly on the graph. The data model is here: https://docs.google.com/spreadsheets/d/1naChcuZtjSbk...
- 7 years ago
Hi,
Write this measure and drag it to your visual
=CALCULATE(SUM('Table'[Product A uncum]);DATESINPERIOD('Table'[Date];LASTDATE('Table'[Date]);-3;MONTH))
Hope this helps.
Anonymous
7 years agoNot applicable
Hi Anonymous,
I'd like to suggest you use below measure formula if it suitable for your requirement:
Product3Mth =
VAR currDate =
MAX ( 'Table'[Date] )
RETURN
CALCULATE (
SUM ( 'Table'[Product A uncum] );
FILTER (
ALLSELECTED ( 'Table' );
'Table'[Date]
>= DATE ( YEAR ( currDate ); MONTH ( currDate ) - 3; DAY ( currDate ) )
&& 'Table'[Date] <= currDate
)
)
/ 3
Regards,
Xiaoxin Sheng