Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi
I have a dataset for number of accidents in various regions for the last 3 years. I want to calculate the averag number of accidents from the last 3 months but excluding the current month.
e.g. we are in February 2022, therefore I want an average of accidents for Jan 22', Dec 21' and Nov 21'.
Solved! Go to Solution.
@KikiLondon , try a measure like
Rolling 3 = calculate(AverageX(Values('Date'[MONTH Year]),CALCULATE(sum(Sales[Sales Amount]))),DATESINPERIOD('Date'[Date ], eomonth(MAX('Date'[Date ]),-1) ,-3,MONTH))
@KikiLondon , try a measure like
Rolling 3 = calculate(AverageX(Values('Date'[MONTH Year]),CALCULATE(sum(Sales[Sales Amount]))),DATESINPERIOD('Date'[Date ], eomonth(MAX('Date'[Date ]),-1) ,-3,MONTH))
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
12 | |
11 | |
7 | |
6 |