Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi all,
I'm using the rolling average quick measure for the first time and I just wanted to sense check that it worked correctly. I need a rolling 7 day average, so do I need to select -6 or -7? And should the second part of the DATEADD(_last date be a 0 or a 1?
Kind regards,
Jordan
Solved! Go to Solution.
Hi all,
The answer to my question was to use the below formula, which had a -6 and 0. Indicating that the current day will be used and the previous 6 days will also be added.
Hi all,
The answer to my question was to use the below formula, which had a -6 and 0. Indicating that the current day will be used and the previous 6 days will also be added.
Hi @Anonymous ,
You can update the formula of measure [Count of EventType rolling average] as below:
Count of EventType rolling average =
CALCULATE (
COUNT ( 'Agent Data'[EventType] ),
DATESINPERIOD ( 'Date'[Date], LASTDATE ( 'Date'[Date] ), -7, DAY )
)
In addition, you can refer the following documentations to achieve it.
Moving average based on Rolling 7 days - per customer/subject
Best Regards
Rena
@Anonymous , Have you tried like
Rolling 7 day = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],MAX(Sales[Sales Date]),-7,Day))
or like
Rolling 3 till last 2 Day= CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],max(dateadd(Sales[Sales Date],-2,Day)),-3,Day))
User | Count |
---|---|
139 | |
113 | |
103 | |
73 | |
63 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |