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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Allow a slicer to change columns on a matrix.

Hello all, I have a seemingly simple issue that I'm having trouble implementing. I have a simple matrix where the rows are categories, the values are profit and %GT profit, and the columns are years. For the purpose of this question, I'm focusing on the years. 

 

The goal here is to have a slicer affect the number of years displaying. 

For example, if A value is chosen, display years 2020 and greater

if any other value is chosen, display all years. 

I did some googling and this seems possible, but all the examples I viewed were more complex and I couldn't retool it to my issue. 

Any help would be greatly appreciated, thank you!

 

EDIT: here is some sample data and the expected output: 
Data: 
Year_Field = 2015-2022
Segment_Field = A, B, C 

Category_Field = X, Y, Z

 

Expected output in Matrix form: 

No slicers chosen = 

Category  2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022
X
Y
Z

Slicer selection of A = 
Category  2018 | 2019 | 2020 | 2021 | 2022
X
Y
Z

Slicer selection of B and C = 
Category  2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022
X
Y
Z

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

You will need to create a slicer table like below:

vjaywmsft_0-1650531790488.png

Then create a relationship between slicer table and fact table by using year columns.

vjaywmsft_1-1650531846929.png

Then you should be able to filter the matrix by slicer.

vjaywmsft_2-1650531888149.png

vjaywmsft_3-1650531899252.png

 

Best Regards,

Jay

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Hi @Anonymous ,

 

You will need to create a slicer table like below:

vjaywmsft_0-1650531790488.png

Then create a relationship between slicer table and fact table by using year columns.

vjaywmsft_1-1650531846929.png

Then you should be able to filter the matrix by slicer.

vjaywmsft_2-1650531888149.png

vjaywmsft_3-1650531899252.png

 

Best Regards,

Jay

parry2k
Super User
Super User

@Anonymous no idea how I assume these are columns in the same table:

 

Year_Table = 2015-2022
Segment_Table = A, B, C 

Category_Table = X, Y, Z

 

Regardless, can you paste data in the table format. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k 

Yeah, no idea either, my post clearly says field! 😛

Seriously though, I'm not sure what you mean by table format, sorry. This is from 1 table with about ~20 columns. I would rather not post exact data and what I have structured already is the logic at its most basic. 

Can you elaborate a bit and I'll see if I can accomodate? 

parry2k
Super User
Super User

@Anonymous what is the relationship between these tables?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k These are not separate tables, just separate fields in the same table. 

parry2k
Super User
Super User

@Anonymous if you can put a sample data and the expected output, it will help to provide the solution.  It surely need some DAX juggle but doable.

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k 
I have updated my original post to include a simple example. 

Anonymous
Not applicable

@parry2k  are you able to assist? 

Post is a bit older, so not sure if I should repost or wait for a reply...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.