Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
lovekheart
New Member

Create a Matrix that has 3,6,12 month averages of measures

lovekheart_0-1750877729801.png

This picture showcases the end goal (sorry i dont have a better example) that i am trying to acheive. I do have a calender table and all the measures but cant seem to find how to achieve this for the matrix visual. Please reach out with any knowldege on this!

1 REPLY 1
OwenAuger
Super User
Super User

Hi @lovekheart 

I would recommend a calculation group containing calculation items for each of the average calculations.

https://learn.microsoft.com/en-us/power-bi/transform-model/calculation-groups

 

Each calculation item's expression should contain SELECTEDMEASURE ( ) as a placholder for the measure it will be applied to.

For example, if your averages are defined as arithmetic means of monthly measure values for the last N months (as at the max date filtered), you might use this calculation item expression for "Last 3 months":

CALCULATE (
    AVERAGEX (
        VALUES ( 'Date'[Year Month] ), -- or column with month/year granularity
        SELECTEDMEASURE ( )
    ),
    DATESINPERIOD ( 'Date'[Date], MAX ( 'Date'[Date] ), -3, MONTH )
)

 

You could then construct the matrix with:

Is that enough to go on?

I could create a small example to demonstrate the setup if that would be useful.


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.