Forum Discussion
Anonymous
2 years agoNot applicable
Calculate Moving Average
Hi, I have data which looks like: Site Date Value Moving Average London 01-01-2022 0.1 0.1 London 28-01-2022 0.2 0.15 London 01-02-2022 0.3 0.2 London 01-03-2022 0.6 0...
- 2 years ago
hi Anonymous ,
you may try to add a calculated column like:
Column = AVERAGEX( FILTER( data, data[Site]=EARLIER(data[Site]) &&data[Date]<=EARLIER(data[Date]) ), data[Value] )it worked like:
- 2 years ago
Moving AVG = AVERAGEX( WINDOW( 1, ABS, 0, REL, DATA, ORDERBY( DATA[Date] ), DEFAULT, PARTITIONBY( DATA[Site] ), MATCHBY( DATA[Site], DATA[Date] ) ), DATA[Value] )
Anonymous
2 years agoNot applicable
Hi Anonymous ,
Could you please tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please feel free to let me know.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.