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
nk19330
Advocate II
Advocate II

how do I use specific values from two different columns in a table as column headers in a matrix

Hello,

 

I have data in this format: 

nk19330_0-1745881051370.png

 

and I have to present it in the below format in a matrix visual where M1& M2 are measures calculated from col4 and ct = rowcount for the category or subcaetegory

 

nk19330_0-1745881486860.png

 

 

Please suggest how to achive this?

 

TIA !

 

 

1 ACCEPTED SOLUTION
Irwan
Super User
Super User

hello @nk19330 

 

please check if this accomodate your need.

Irwan_0-1745883200853.png

 

if the Category 3 will be always split, i would do somehting like below.

1. create a new custom column with following code to create a column you want to use as matrix header

if [Column2]="Category 1" or [Column2]="Category 2" then [Column2] else [Column3]

Irwan_1-1745883280053.png

 

2. plot the custom column into matrix visual along with all measures.

Irwan_2-1745883337912.png

 

Hope this will help.

Thank you.

View solution in original post

2 REPLIES 2
v-pagayam-msft
Community Support
Community Support

Hi @nk19330 ,
Thank you @Irwan for the prompt response!
Could you please confirm if the issue has been resolved on your end? If a solution has been found, it would be greatly appreciated if you could share your insights with the community. This would be helpful for other members who may encounter similar issues.
Thank you for your understanding and assistance.

Irwan
Super User
Super User

hello @nk19330 

 

please check if this accomodate your need.

Irwan_0-1745883200853.png

 

if the Category 3 will be always split, i would do somehting like below.

1. create a new custom column with following code to create a column you want to use as matrix header

if [Column2]="Category 1" or [Column2]="Category 2" then [Column2] else [Column3]

Irwan_1-1745883280053.png

 

2. plot the custom column into matrix visual along with all measures.

Irwan_2-1745883337912.png

 

Hope this will help.

Thank you.

Helpful resources

Announcements
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.

June 2025 community update carousel

Fabric Community Update - June 2025

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