cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ashthakur786
New Member

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.

 

ashthakur786_0-1675814301093.png

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 1
v-rongtiep-msft
Community Support
Community Support

Hi @ashthakur786 ,

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.

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors