March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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
Solved! Go to Solution.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi,
Share some data and show the expected result.
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.
Hi,
Share the download link of the PBI file.
**
Hi,
You may download my PBI file from here.
Hope this helps.
thanks! that works.
Can we show the year 2022 when it is selected as a cumulative? I also want to show the last 6 months @Ashish_Mathur
You are welcome. In my measure, change the -11 to -5.
Can we show the year 2022 when it is selected as a cumulative? I also want to show the last 6 months @Ashish_Mathur
Your question is not clear. Please clarify.
hi ashish,
i want to see your 12 month average cumulative every year. I also want to show the last 6 months while doing this
I still do not understand your requirement. Show the expected result very clearly in an MS Excel file with formulas. I will try to convert those Excel formulas into DAX formulas.
*
Hi,
Someone else will help you.
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 )
Hi, to the extent that I use it for averaging, I unfortunately get incorrect results. Could you change the dimension in the image to its non-hierarchy?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |