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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Wanting to create a matrix (or similar visual) that shows values for multiple categories over 3 yrs

Hi Everyone!

 

Hoping to get some assistance please.

 

Scenario:

I am trying to create a matrix (or similar visual) that shows values of 10 categories, over the same period for the last three years.

(e.g Dec 2021 Dec, 2022, Dec 2023.)

 

This matrix will be one of several visuals on the page, with a filter visual which allows the user to select the reporting Month Year.

So for example Dec 2023 selection on the filter for the page, should show me December results for all visuals, but the for maxtrix, I want to see Dec 2023, as well as Dec 22 and Dec23.

 

Here is an example of what I want to end up with:

Table goal.PNG

 

I've seen videos on using DATEADD to write a measure, however only for one category. I have ten categories, so do I need to write a measure for each of them?? I thought this is probably not the right approach. Am I better off doing somethign in Power Query instead?

 

And how can I keep Dec 2022 and Dec 2023 values in the matrix, instead of having it disappear when I add a date filter?

I did see a you tube video about creating a realtionship but making it inactive, so its only active when called upon in a measure....is this something that would work?

 

I'm open to all suggestions - thank you very much! 😊

 

3 REPLIES 3
danextian
Super User
Super User

Hi @Anonymous ,

 

This can be fairly done in Power BI and you won't need overly complex queries or DAX formulas.  What you'll need is a disconnected Dates table (no relationship to fact) as a regular Dates table  will filter the view of your visual (eg clicking Dec 2023 will show just Dec 2023) and then a measure to filter your visual. As to the measures, you can just move them to rows or you can follow a more complex approach of creating a measure that returns other measures depending on the current row value of the field you put in the row tile. For your use case, I believe, the former would suffice.  Please see sample below and the attached pbix for your reference:

danextian_0-1708491040461.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
vicky_
Super User
Super User

You can use a Date Table to help - create a column for the month name, and exclude the year from the slicer (so it will show Dec of any year). In your matrix, keep the year and month.
If you don't want your filter to only show the selected year from the slicer, there's no need to create new measures or mess around with the relationships (unless there's some hidden requirements that aren't explained?). instead, you can disable visual interactions between the slicer and matrix: https://learn.microsoft.com/en-us/power-bi/create-reports/service-reports-visual-interactions?tabs=p...

 

Anonymous
Not applicable

Hi Vicky,

Thanks for your reply.

 

Just to clarify, I still need to use the visual interactions with the date filter and the matrix, as I need it to be dynamic. So if the user selects January 2024 from the drop down, I need the matrix to show the last three years of data. E.g Jan 24, Jan 23 Jan 22. I am at a loss on how to construct things so that the filter only looks at the one column in reference to the interaction, and not exclude the previous two years of data. 🤔

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors