Forum Discussion
Anonymous
3 years agoNot applicable
A rolling average per half hour
Hi, I would like to calculate a rolling average per 30 minutes in large amount of data. Every minute a machine registers data. I want to see an average value over the PAST 30 minutes in THAT spec...
- 3 years ago
Hi Anonymous
Please refer to attached file with the solution.
Rolling Average = VAR CurrentTime = Data[TimeStamp] VAR PreviousTime = CurrentTime - TIME ( 0, 30, 0 ) VAR FilteredTable = FILTER ( Data, Data[TimeStamp] <= CurrentTime && Data[TimeStamp] > PreviousTime ) RETURN AVERAGEX ( FilteredTable, Data[Value] )
tamerj1
Community Champion
3 years agoHi Anonymous
Please refer to attached file with the solution.
Rolling Average =
VAR CurrentTime = Data[TimeStamp]
VAR PreviousTime = CurrentTime - TIME ( 0, 30, 0 )
VAR FilteredTable = FILTER ( Data, Data[TimeStamp] <= CurrentTime && Data[TimeStamp] > PreviousTime )
RETURN
AVERAGEX ( FilteredTable, Data[Value] )
Anonymous
3 years agoNot applicable
That is exactly what I need. I tried this and I still have one issue though...
Is there something I can do about it?
- tamerj13 years ago
Community Champion
Anonymous
The provided code is a calculated column not a measure. If you are looking for a measure, please check the sample file and amend it witht the eaxpexcted visual then share it with me.