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.
- V-lianl-msft6 years agoCommunity Support
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. - Jrose5 years agoFrequent Visitor
Hi
I'm trying to do something similar, but I'm having trouble following your references. When you create an index column, do you mean that each record within a batch got the same index number?
What do table Index and table Parameter refer to? Did you create a separate table just for the index numbers and Parameters is the actual data?