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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
VladyOselsky
Frequent Visitor

Need help setting up Matrix

Hello,

 

I'm not sure if there is functionality in defaul visual to achive the following. I have setup measures to Calculate Sales Total, Sales Quantity and other related information. After that I added column to my matrix that breaks it into different categories.

I want to be able to group all categories under a each measures instead of grouping measures under each category. Currently my matrix looks like example 1. But I want to convert it to look like example 2.

I have tried to use Options -> Switch Values to Rows which looks better but it makes it harder to see trendes over months for each section as it produces extra rows.

I really don't want to setup measures for each category in the following matter SalesTotalAll, SalesTotalGear, SalesTotalClothing, SalesTotalMisc etc. 

 

VladyOselsky_0-1689626934095.png

 

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi , @VladyOselsky 

According to your description, you want to convert the Matrix visual , do you mean you want to make this:

vyueyunzhmsft_0-1689735789192.png

If this , you can create a dimension table 'table 2' like this:

vyueyunzhmsft_1-1689735812040.png

 

Then we can create a measure based on youe second measure :

Measure = 
var _type =  MAX('Table 2'[Column1])
return
IF(_type = "Sales Total" ,  SUMX( VALUES('Table'[Categories]) , [Sales Total]) , IF( _type="Sales Quanity" , SUMX( VALUES('Table'[Categories]) , [Sales Quantity])))

 

The result is as follows:

vyueyunzhmsft_2-1689735861560.png

 

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

2 REPLIES 2
v-yueyunzh-msft
Community Support
Community Support

Hi , @VladyOselsky 

According to your description, you want to convert the Matrix visual , do you mean you want to make this:

vyueyunzhmsft_0-1689735789192.png

If this , you can create a dimension table 'table 2' like this:

vyueyunzhmsft_1-1689735812040.png

 

Then we can create a measure based on youe second measure :

Measure = 
var _type =  MAX('Table 2'[Column1])
return
IF(_type = "Sales Total" ,  SUMX( VALUES('Table'[Categories]) , [Sales Total]) , IF( _type="Sales Quanity" , SUMX( VALUES('Table'[Categories]) , [Sales Quantity])))

 

The result is as follows:

vyueyunzhmsft_2-1689735861560.png

 

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

Ashish_Mathur
Super User
Super User

Hi,

As far as i know, this is not possible to do.  One will have to use calculations Groups in the Tabular Editor.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.