Forum Discussion
sonya7
3 years agoHelper III
12 month rolling average
I have Amount data based on Startdate date. How can I write the 12-month average?
i'm new, it is important to me that you are clear 🙏 thanks
16 Replies
- AnonymousNot applicable
Hi sonya7 ,
You can refer the following links to get it:
Rolling 12 Months Average in DAX
Sales R12M = VAR NumOfMonths = 12 VAR LastCurrentDate = MAX ( 'Date'[Date] ) VAR Period = DATESINPERIOD ( 'Date'[Date], LastCurrentDate, - NumOfMonths, MONTH ) VAR Result = CALCULATE ( AVERAGEX ( VALUES ( 'Date'[Calendar Year Month] ), [Sales Amount] ), Period ) VAR FirstDateInPeriod = MINX ( Period, 'Date'[Date] ) VAR LastDateWithSales = MAX ( Sales[Order Date] ) RETURN IF ( FirstDateInPeriod <= LastDateWithSales, Result ) - Ashish_MathurSuper User
Hi,
Share some data and show the expected result.
- sonya7Helper III
Hello, I want the following rolling average 4 result. But since this measure was created with quick measure, I could only use it with hierarchy.
I want this measure to be used without a date hierarchy.- Ashish_MathurSuper User
Hi,
Share the download link of the PBI file.