Forum Discussion
Different measures in Matrix visual
- 1 year ago
Hi Manish1198 ,
For this you need to create a separate table with the category and the measure names:
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.
Use the condittional formatting with a rule for the formmating measure:
See file attach.
- 1 year ago
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]))I also updated the matrix table acordingly.
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.
- Manish11981 year agoHelper I
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.
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- MFelix1 year agoSuper User
Hi Manish1198 ,
For this you need to create a separate table with the category and the measure names:
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.
Use the condittional formatting with a rule for the formmating measure:
See file attach.
- Manish11981 year agoHelper I
Awesome MFelix Thanks for sharing your knowledge.