Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
How to calculate month average from sum? prefer 12month running average.
below 'totalAmount' was a 'New Measure'.
@Anonymous
@GilbertQ's formula should be correct, just change the "SUM" into "AVERAGE". If the dates are not contiguous, you can use AVERAGEX() function. See my sample below;
Moving 3 Months Average = CALCULATE ( AVERAGEX ( 'SAMPLE', 'SAMPLE'[REVENUE] ), DATESINPERIOD ( 'SAMPLE'[FullDate], LASTDATE ( 'SAMPLE'[FullDate] ), -3, MONTH ) )
Regards,
@v-sihou-msft Average = calculate(averagex('Master Category',[TotalAmount]),datesinperiod('Calendar'[Date].[Month],lastdate('Calendar'[Date].[Month]),-3,Month))
do you know what's wrong?
what i need is the moving average (new measure) show up as a 'card'. the 3 month moving average below should be (-252-356-40)/3 = -216.
Hi there you can use the following below.
NOTE: You will have to change the dates to be the dates from your table. You could also possibly change it from MONTH to YEAR and make it -1? It just depends on how you want to see it.
Moving Total 12 Months = CALCULATE ( SUM('Session'[Sessions] ), DATESINPERIOD ( 'Date'[FullDate], LASTDATE ( 'Date'[FullDate] ), -12, MONTH ) )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
80 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |