Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

15 minute moving average for non-continues data spanning multiple days

Hi,

 

This is my first post so appologies for not following set standards 🙂

I have data in the format below, for multiple 'events' spanning over multiple days.

 

My goal is to create a dashboard with date slicer allowing user to select a single day and highlight graph with 15 min moving average for TMinMin (count of events in a minute) for selected event.

I have tried to create a measure below but incorrect results.

 
15minRollingAvgB2R02 =
VAR MinsInWindow_ = 15 //Change window lenght as required (in minutes)
VAR HigherEnd_ = SELECTEDVALUE(SUMM_CVT01[TimeStamp])
VAR LowerEnd_ = HigherEnd_ - MinsInWindow_ / ( 24 * 60 )
RETURN
    CALCULATE (
        AVERAGE ( SUMM_CVT01[TMinMin] ),
        SUMM_CVT01[TimeStamp] <= HigherEnd_,
        SUMM_CVT01[TimeStamp] > LowerEnd_,
        All(SUMM_CVT01)
    )

 

Thanks for reading and appreciate any help.

 

cheers,

Ash

 

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    What kind of results are you trying to get from the data you provided? 
    Can you add another column after it with the desired output? And explain in detail how it is calculated, please!

     

    How to Get Your Question Answered Quickly 

     

     

    Best Regards
    Community Support Team _ Polly

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.