Forum Discussion
aslee
9 years agoHelper I
Moving average over non-date values
Hi All, I need to calculate a moving average over time, however the time is set as numerical iterations, not dates. The average needs to be over the 2 iterations - for example, the current i...
- 9 years ago
Hi aslee
Please try the following calculated measure but change Table4 to the name of your table.
Avg = FORMAT( CALCULATE( AVERAGE('Table4'[Cycle Time]), FILTER(ALL('Table4'), 'Table4'[Iteration]>=MAX(Table4[Iteration])-1 && 'Table4'[Iteration]<=MAX('Table4'[Iteration]) ) ), "##.0")
aslee
9 years agoHelper I
Thank you Phil_Seamark! This has worked and looks great in a table - but for some reason I get this error when I go to put it in a line chart
My x-axis is Iteration, which is set to numerical integer format.
Anyone have any ideas what this means?
aslee
9 years agoHelper I
Nevermind - worked it out! I took out the formatting section and it fixed it.
Thanks again!