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
asa70
Frequent Visitor

Matrix Visual Assistance: To Show a Combination of Years and Specific Months

Hi all,

 

I hope you are all well,

 

I have been tasked to showcase the 12 month rolling averages for various departments. I have managed to get the calculations for the rolling averages. This is how they want the visual to represent:

asa70_0-1741770833206.png


Any ideas on how to achieve this view on the matrix visual? Any help would be appreciated 🙂

Kind Regards,

Asa

10 REPLIES 10
v-vpabbu
Community Support
Community Support

Hi @asa70,

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Vinay Pabbu

Hi @asa70,

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Vinay Pabbu

Hi @asa70,

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Vinay Pabbu

Hi @v-vpabbu, apologies for the late reply. The solution is providing blanks which is not the desired outcome

v-vpabbu
Community Support
Community Support

Hi @asa70

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot). Do not include sensitive information or anything unrelated to the issue or question. Also, show the expected outcome based on the sample data you provided.

 

Need help uploading data? How to provide sample data in the Power BI Forum - Microsoft Fabric Community

 

Regards,

Vinay Pabbu

Hi @v-vpabbu, thank you so much for the assistance. Unfortunately, the solution had 2 problems which I saw:

  1. The year totals were no longer shown, just the months for the years
  2. The solution returns 0 for the selected months

Kind Regards,

Asa

v-vpabbu
Community Support
Community Support

Hi @asa70,

 

The missing year totals happen because the measure only calculates when Month is in scope.

Adjust the measure to handle totals separately and verify the underlying data.

 

Regards,

Vinay

amitchandak
Super User
Super User

@asa70 ,
You need to have measure like the ones below. The year logic can be based on today

Net at Year Level = if( ISINSCOPE('Date'[Month No]) && Max('Date'[Year]) < 2020 , BLANK(), [Net])

 

amitchandak_0-1741774252768.png

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak , thank you so much for your solution. I have tested it out. Unfortunately, the totals column gives the wrong values to the rolling average calculation

 

Let me expand on the image, hopefully it can provide more clarity:

1. Rolling Average Column name - This is a part of a measure select function. 
2. The year

3. The last 3 months of the last year

Would I need to make provision for the measure select attribute name in (1) in the measure you provided?

v-vpabbu
Community Support
Community Support

Hi @asa70,

 

Try this:

Rolling 12M Avg (Final) = 
VAR _IsMonth = ISINSCOPE('Date'[Month No])
VAR _LastDate = MAX('Date'[Date])
VAR _CutoffDate = EOMONTH(TODAY(), -14)  -- Allows last 12 months + last 3 of previous year

RETURN
IF(
    _IsMonth && _LastDate >= _CutoffDate,
    CALCULATE(
        AVERAGEX(
            DATESINPERIOD('Date'[Date], _LastDate, -12, MONTH),
            [Net]
        )
    ),
    BLANK()
)

 

Regards,

Vinay Pabbu

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.