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,
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