Forum Discussion
Rolling average without dates
- Anonymous6 years ago
I found out how to do it minutes after I posted on the forum. I found a calculated column code which works exactly how I want it.
Column = var my_index = 'Table'[Index] var my_result = AVERAGEX( FILTER( 'Table', 'Table'[Index] > my_index-5 && 'Table'[Index] <= my_index ), 'Table'[Parameter] ) RETURN my_resultThis makes a rolling average of the last 5 parameters. You will need to create an index column, but that's the only thing you should need to create in order to graph a rolling average.
I found out how to do it minutes after I posted on the forum. I found a calculated column code which works exactly how I want it.
Column =
var my_index = 'Table'[Index]
var my_result =
AVERAGEX(
FILTER(
'Table',
'Table'[Index] > my_index-5 &&
'Table'[Index] <= my_index
), 'Table'[Parameter]
)
RETURN my_resultThis makes a rolling average of the last 5 parameters. You will need to create an index column, but that's the only thing you should need to create in order to graph a rolling average.
Hi Anonymous ,
It's glad that you have solved your problem.
Please accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.