The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance 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 |
---|---|
11 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
23 | |
14 | |
13 | |
10 | |
8 |