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 September 15. Request your voucher.

Reply
Anonymous
Not applicable

Arrange Row & Column in Matrix Visual

Hi All,

 

I have Table A as picture below. How can I arrange those rows and column in Table A to the Matrix below. Anyone have any idea? I'm prefer to use measure instead of transform the table in Powerquery since I have couple of other column to make further calculation. Really appreciate your help.

qhpowerbi_1-1699592946372.png

 

 

5 REPLIES 5
pratyashasamal
Memorable Member
Memorable Member

Hi @Anonymous ,
First unpivot the loaded table and then create a matrix view on top of it .
To unPivot the table please follow these steps:-
https://databear.com/power-bi-pivot-and-unpivot-columns/
Hope this was helpful.
Thanks,
Pratyasha Samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C





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

Proud to be a Super User!





Uzi2019
Super User
Super User

Hi @Anonymous 
I have taken your sample data.please do the following stepts in power query:
1) Select all the column except teacher ( select Class A, Class B, Class C, Score 1, Score 2, Score 3)
2) Go to Transform Tab then select Unpivot Columns

Uzi2019_0-1699594068500.png

 

3) then duplicate the Attribute column like below

Uzi2019_2-1699594257067.png

4) select the duplicate column and select split column option from tranform tab

Uzi2019_3-1699594394221.png

 

5) select space as delimiter

Uzi2019_4-1699594803157.png

 

6)you will see the below columns

Uzi2019_5-1699594834112.png

 

7) select attribute copy 2 and remove it.

Uzi2019_6-1699594901268.png

 

😎 Close and Apply

9) take Matrix visual and the columns accordingly

Uzi2019_7-1699594989041.png

 

Uzi2019_8-1699595007471.png

 

10) Disable row subtotal from setting

Uzi2019_9-1699595041377.png

 

 

I hope I answered your question!

 

 

 



 

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
Anonymous
Not applicable

Is there anyway to do without using Power Query? I mean using measure. Because I need to use some of other column to make further calculation.

Thank you!

Hi @Anonymous 
You can create duplicate table then you can pivot only one table. and on other table you can create calcuation.

 

I hope this would work for you.

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
Anonymous
Not applicable

example of the things that i would like to calculate/display further is to display rolling 12 month of the data (imagine there is a date table). I have try to pivot using powerquery but I cannot display rolling 12 month for the 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 Kudoed Authors