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.
I have written this DAX expression for a measure in order to find the 12 month rolling average starting from the most recent month to 12 months before.
This is the most recent month in the table i.e. September.
However the first month displays February whereas it should have been October i.e. October to September.
I'm unsure as to why this is happening as the data is precise for all months from 2018-2023. Would appreciate any help.
Hi @kkashiv I would say your measure for Average do not include unique values for periods as in 12 months period there is "2 years" included, like 3 months from previous year and 9 months in this year. I mean, you should include your Calendar date, columns like YEAR-MONTH, not just month. Try it and debug.
Great link with example is below
https://www.sqlbi.com/articles/rolling-12-months-average-in-dax/
Hope this help. Cudos appreciated.
Proud to be a Super User!
User | Count |
---|---|
12 | |
9 | |
6 | |
6 | |
6 |
User | Count |
---|---|
24 | |
14 | |
14 | |
9 | |
7 |