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
kongyuancn
Helper II
Helper II

Dynamically switch row and column in matrix

Hello Sir,

I want to know is it possible to dynamically switch row and column in Matrix?

For example I've a small table defined how to display in matrix:

idx-axisy-axis
1plot_aplot_b
2plot_bplot_a

 

 

when I show data for id=1 the matrix looks like this:

 plot_a
plot_bVALUE_1

           

 

when I show data for id=2 the matrix looks like this:

 plot_b
plot_aVALUE_2

 

Can field parameter can handle this? Or there are other magic?

 

Thanks in advance

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @kongyuancn 

Thanks for the reply from @bhanu_gautam , please allow me to provide addition:

Based on your information, I create a sample table:

vyohuamsft_1-1722829007522.png

Create a field parameter with `x-axis` and `y-axis`.

vyohuamsft_0-1722828963214.png

vyohuamsft_2-1722829759253.png

 

In table view, uncheck the option to hide in report view

vyohuamsft_3-1722829801019.png

 

Then create matrix and put parameter and parameter field in matrix. Also create a slicer and put ID in it.

vyohuamsft_4-1722830002508.png

Select slicer to change value:

vyohuamsft_5-1722830120893.png

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi, @kongyuancn 

Thanks for the reply from @bhanu_gautam , please allow me to provide addition:

Based on your information, I create a sample table:

vyohuamsft_1-1722829007522.png

Create a field parameter with `x-axis` and `y-axis`.

vyohuamsft_0-1722828963214.png

vyohuamsft_2-1722829759253.png

 

In table view, uncheck the option to hide in report view

vyohuamsft_3-1722829801019.png

 

Then create matrix and put parameter and parameter field in matrix. Also create a slicer and put ID in it.

vyohuamsft_4-1722830002508.png

Select slicer to change value:

vyohuamsft_5-1722830120893.png

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

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

Thanks @Anonymous , this is exact what I need!

bhanu_gautam
Super User
Super User

@kongyuancn , Try using below method

 

Create Parameter Table:
Axis Parameter = {
("Plot A", "plot_a"),
("Plot B", "plot_b")
}
Add Slicer:

Drag the "Axis Parameter" to the slicer.
Matrix Setup:

Drag "Axis Parameter" to the Rows or Columns field well.
Add your measure (e.g., VALUE_1 or VALUE_2) to the Values field well.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






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