Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello everyone,
I need your help to build a somewhat special matrix, like the one shown in the following image. This matrix shows the last 15 months of history, the average of the last 3 months, average of the last 12 months and the average of the entire history of the data.
I think the only way to build it is with a support table to generate the desired columns, but I need the periods to be mobile.
In Table 2 of the pbix file I have solved the moving periods, but I need to add the averages columns!!!
Any help will be highly appreciated. Thanks a lot!
@cheyzaguirre , If you are looking for the format, I doubt that. I created an idea for that
https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/39773011-hybrid-table
You can get month like
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
2nd last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-2,MONTH)))
3rd last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-3,MONTH)))
4th last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-4,MONTH)))
and so on, if you need simple avg -- Over all
Cumm Sales = CALCULATE(Average(Sales[Sales Amount]),filter(date,date[date] <=maxx(date,date[date])))
Cumm Sales = CALCULATE(Average(Sales[Sales Amount]),filter(date,date[date] <=max(Sales[Sales Date])))
Rolling
Rolling 3 = CALCULATE(Average(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],ENDOFMONTH(Sales[Sales Date]),-3,MONTH))
Rolling 12 = CALCULATE(Average(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],ENDOFMONTH(Sales[Sales Date]),-12,MONTH))
Thank you for your answer, but it does not completely solve my problem since selecting a month filters the matrix and only shows the selected period. I need to select a month to show from the selected month back all the measurements
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.