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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
tmendoza
Helper III
Helper III

Matrix Visual, How to have dynamic column headers based off of a slicer selection

Hello all,

 

Hoping you could help me out with this brain teaser.

Below are two Matrixes. Utilization by job level and Utilization by Service Line.

The Row field and Value field are the same in both visuals. It's just the Column fields that differ.

I would like to know if there is a way to have one matrix visual that switches between job level and service line as the column headers based off of a slicer.

 

Thank you in advance for any advice you may give!

 

 

 

Utilization by level.PNGUtilization by service line.PNG

1 ACCEPTED SOLUTION

I think I've managed to make this happen.

 

I've started at the query. I've got a data set for each matrix visual that I want and I've unionized them all together.

I've got a column in each query called dynamic Column and Dynamic Row. Even columns called Dynamic row Hierarchy 1 & 2 for the hierarchys. In these Columns I put what I want shown in the column and Row Headers. What separates all these queries from one another is a Column I've included in each data set called Slicer. This column simply has the titles that will be shown in the slicer of the visual in PBI. Each Data set has it's own slicer name. Once I've loaded the dynamic column and row columns into the fields in PBI I insert the slicer column into a slicer visual. Single select "on" and boom! A dynamic matrix. Column headers and rows change with the selection of a slicer.

 

View solution in original post

2 REPLIES 2
dax
Community Support
Community Support

Hi tmendoza,

As I know, we couldn't use measure on column value in Matrix, so we couldn't use slicer to switch it. Ig you want to achieve two visual's switch, I think you could use bookmark. You could refer to Bookmarks and Buttons: Making Power BI Charts Even More Interactive  for details.

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I think I've managed to make this happen.

 

I've started at the query. I've got a data set for each matrix visual that I want and I've unionized them all together.

I've got a column in each query called dynamic Column and Dynamic Row. Even columns called Dynamic row Hierarchy 1 & 2 for the hierarchys. In these Columns I put what I want shown in the column and Row Headers. What separates all these queries from one another is a Column I've included in each data set called Slicer. This column simply has the titles that will be shown in the slicer of the visual in PBI. Each Data set has it's own slicer name. Once I've loaded the dynamic column and row columns into the fields in PBI I insert the slicer column into a slicer visual. Single select "on" and boom! A dynamic matrix. Column headers and rows change with the selection of a slicer.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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