Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
I am using the quick measure Rolling avg 3 months.
The formula is:
IF( ISFILTERED('Posting date'[Date]), ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
VAR __LAST_DATE = ENDOFMONTH('Calendar'[Date].[Date])
VAR __DATE_PERIOD = DATESBETWEEN( 'Calendar'[Date].[Date], STARTOFMONTH(DATEADD(__LAST_DATE, -3, MONTH)), __LAST_DATE ) RETURN AVERAGEX( CALCULATETABLE( SUMMARIZE( VALUES('Calendar'), 'Calendar'[Date].[Year], 'Calendar'[Date].[QuarterNo], 'Calendar'[Date].[Quarter], 'Calendar'[Date].[MonthNo], 'Calendar'[Date].[Month] ), __DATE_PERIOD ),
CALCULATE( SUM('sales'[Amount]), ALL('Calendar'[Date].[Day]) ) ) )
When I export in Excel in Power BI service to analyze, In pivot table fields, using as filter Calendar date and as value the rolling avg 3m I dont see any value.
Thanks!
Solved! Go to Solution.
@Nun , You can try with date table like the example given below
Take line level Avg
Rolling 3 = CALCULATE(Average(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-3,MONTH))
Take sum and divide by month. Month level Avg
Rolling 3 = divide( CALCULATE(sum(Sales[Sales]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date]),-3,MONTH)) ,
CALCULATE(distinctCOUNT('Date'[Month Year]),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-3,MONTH), not(isblank((Sales[Sales])))))
@Nun , You can try with date table like the example given below
Take line level Avg
Rolling 3 = CALCULATE(Average(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-3,MONTH))
Take sum and divide by month. Month level Avg
Rolling 3 = divide( CALCULATE(sum(Sales[Sales]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date]),-3,MONTH)) ,
CALCULATE(distinctCOUNT('Date'[Month Year]),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-3,MONTH), not(isblank((Sales[Sales])))))
I solved the issue, R at the end of the value is due to the format. Power BI converted, automatically the value in Currency format, when the correct is Decimal number.
Thanks a lot!
I created both the measure you suggested, but I get a value number ending with R. (for example 15879157.9867R)
Thanks
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
75 | |
68 | |
41 | |
35 |
User | Count |
---|---|
102 | |
56 | |
52 | |
46 | |
40 |