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
Manish1198
Helper I
Helper I

Different measures in Matrix visual

I have this requirement to show different measures in a matrix visual.

Manish1198_0-1750716782577.png


I put all the measures and in the Values and reduced the width of the column and created as below. The conditional formatting is the culprit creating disturbance. Is there any other way of doing it? Or is there a way to add the formatting only for specific columns? 

Manish1198_1-1750716872584.png

 

2 ACCEPTED SOLUTIONS

Hi @Manish1198 ,

 

For this you need to create a separate table with the category and the measure names:

MFelix_0-1750753970373.png

 

The order column is to set the order how you want to have the measures.

Now add the following two measures:

Values = CALCULATE( SWITCH(SELECTEDVALUE('Marix Visualization'[Order]),
               1, [SalesForConsumer],
               2, SUM(Orders[Sales]),
               3, SUM(Orders[Profit]),
               4, SUM(Orders[Quantity])), 
         Orders[Category] in VALUES('Marix Visualization'[Category]))


Formatting = SWITCH(
    TRUE(),
    SELECTEDVALUE('Marix Visualization'[Order]) = 2 && [SalesForConsumer] < 5000 , 0,
    SELECTEDVALUE('Marix Visualization'[Order]) = 2 && [SalesForConsumer] >= 5000 , 1,
    SELECTEDVALUE('Marix Visualization'[Order]) = 4 && [SalesForConsumer] < 10 , 0,
    SELECTEDVALUE('Marix Visualization'[Order]) = 4 && [SalesForConsumer] >= 10 , 1)

 

Now create your matrix with the Category and Measure on the columns and place the Values measure on the measures.

MFelix_1-1750754184905.png

 

Use the condittional formatting with a rule for the formmating measure:

MFelix_2-1750754196834.png

 

See file attach.

 

 

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

Hi @Manish1198 

 

Apologies you are correct do the following update to the measure:

Values = CALCULATE(
        SWITCH(SELECTEDVALUE('Marix Visualization'[Order]),
            1, [SalesForConsumer],
            2, SUM(Orders[Sales]),
            3, SUM(Orders[Profit]),
            4, SUM(Orders[Quantity])
            ), 'Marix Visualization'[Category] = SELECTEDVALUE('Calculation group'[Category]))

 

MFelix_1-1750860588400.png

 

I also updated the matrix table acordingly.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

10 REPLIES 10
maruthisp
Super User
Super User

Hi Manish1198,


I tried to implement a solution based on the original post description. I took some smaple data and tried to implement a solution. Please find the attached pbix file.

Different measures in Matrix visual.pbix

As per my knowledge, to show different metrics like Revenue, Cost, and Profit in a matrix, create separate DAX measures for each. Then, add them to the matrix and apply formatting only to the ones you want. This keeps your layout clean and avoids formatting issues.

 

Please let me know if there is any questions..

If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too. And if you found it useful, a quick "Kudos" is always appreciated, thanks! 

 

Best Regards, 

Maruthi 

LinkedIn - http://www.linkedin.com/in/maruthi-siva-prasad/ 

X            -  Maruthi Siva Prasad - (@MaruthiSP) / X

MFelix
Super User
Super User

Hi @Manish1198 ,

 

What are the column you are hiding on the visual? 

 

Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.

If the information is sensitive please share it trough private message.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @MFelix , @maruthisp 
Please find the detail explanation here. 
I want to show different measures under different categories and conditional formatting on sales and Quantity measures based on some rules as in this image. 
Ex:
SalesForConsumer, Sales, Profit for Furniture category
SalesForConsumer, Sales, Quantity for Office Supplies category
Sales, Profit, Quantity for Technology category. 

Manish1198_0-1750750443139.png


I am not sure if this is possible. 
I decreased the width of the not needed measures but the conditional formatting creates some disturbance. 
Here is the sample report
 Drive Link 

Hi @Manish1198 ,

 

For this you need to create a separate table with the category and the measure names:

MFelix_0-1750753970373.png

 

The order column is to set the order how you want to have the measures.

Now add the following two measures:

Values = CALCULATE( SWITCH(SELECTEDVALUE('Marix Visualization'[Order]),
               1, [SalesForConsumer],
               2, SUM(Orders[Sales]),
               3, SUM(Orders[Profit]),
               4, SUM(Orders[Quantity])), 
         Orders[Category] in VALUES('Marix Visualization'[Category]))


Formatting = SWITCH(
    TRUE(),
    SELECTEDVALUE('Marix Visualization'[Order]) = 2 && [SalesForConsumer] < 5000 , 0,
    SELECTEDVALUE('Marix Visualization'[Order]) = 2 && [SalesForConsumer] >= 5000 , 1,
    SELECTEDVALUE('Marix Visualization'[Order]) = 4 && [SalesForConsumer] < 10 , 0,
    SELECTEDVALUE('Marix Visualization'[Order]) = 4 && [SalesForConsumer] >= 10 , 1)

 

Now create your matrix with the Category and Measure on the columns and place the Values measure on the measures.

MFelix_1-1750754184905.png

 

Use the condittional formatting with a rule for the formmating measure:

MFelix_2-1750754196834.png

 

See file attach.

 

 

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @MFelix 
Can we sort this based on some measure. 
Ex: Sort based on profit value from office supplies category

Appreciate your help.

Thanks
Manish

Awesome @MFelix Thanks for sharing your knowledge.

@MFelix does this by any chance work with calculated groups? This isn't working as expected when i use calculated groups in place of Orders[Category] . 

Values = CALCULATE( SWITCH(SELECTEDVALUE('Marix Visualization'[Order]),
               1, [SalesForConsumer],
               2, SUM(Orders[Sales]),
               3, SUM(Orders[Profit]),
               4, SUM(Orders[Quantity])), 
         'Calculation group'[Category] in VALUES('Marix Visualization'[Category]))

 Manish1198_0-1750851090148.png

 

Please see the file File 
Thanks

Hi @Manish1198 ,

 

Hi @Manish1198 ,

 

In this case you need to remove the calculate and filter part from the measure since you are forcing the filter trough the calculaiton group:

Values = 
        SWITCH(SELECTEDVALUE('Marix Visualization'[Order]),
            1, [SalesForConsumer],
            2, SUM(Orders[Sales]),
            3, SUM(Orders[Profit]),
            4, SUM(Orders[Quantity])
            )

MFelix_2-1750858132083.pngMFelix_3-1750858148969.png

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



@MFelix Do you mean all measures will be shown when we use calculated group? can't we show few measures in one category and other measures in other category?
Ex: Can we show the following when using Calculation group[Category]
Sales, Profit, Quantity in Office Supplies;
SalesforConsumer, Sales, Profit in Technology;
Sales, Profit, Quantity in Furniture category.

Hi @Manish1198 

 

Apologies you are correct do the following update to the measure:

Values = CALCULATE(
        SWITCH(SELECTEDVALUE('Marix Visualization'[Order]),
            1, [SalesForConsumer],
            2, SUM(Orders[Sales]),
            3, SUM(Orders[Profit]),
            4, SUM(Orders[Quantity])
            ), 'Marix Visualization'[Category] = SELECTEDVALUE('Calculation group'[Category]))

 

MFelix_1-1750860588400.png

 

I also updated the matrix table acordingly.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



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.