Forum Discussion
sridhar71
3 years agoHelper I
Conditional formatting for each matrix row
I have a Matrix table that shows Inventory turnover for each Vendor. I want to know If I have different conditions for each Vendor. For Ex if the value or Vendor1 >= 300 then use orange but for Ven...
- 3 years ago
I have uploaded a test .pbix file that are working.Does not look like I have possibilites to upload the file. If needed, I can email it to you. Please let me know.
My measure looks like this: (Could you try to change yours as well, and use AND () instead of &.Color measure =SWITCH (TRUE(),AND ( SELECTEDVALUE('Table'[Vendor]) = "Vendor1", SUM ( 'Table'[Value] ) = 100 ), "#e30b5d",AND ( SELECTEDVALUE('Table'[Vendor]) = "Vendor2", SUM ( 'Table'[Value] ) = 200 ), "#8e4585",AND ( SELECTEDVALUE('Table'[Vendor]) = "Vendor3", SUM ( 'Table'[Value] ) = 150 ), "#077106",AND ( SELECTEDVALUE('Table'[Vendor]) = "Vendor4", SUM ( 'Table'[Value] ) = 300 ), "#09387f",AND ( SELECTEDVALUE('Table'[Vendor]) = "Vendor5", SUM ( 'Table'[Value] ) = 200 ), "#5851db")I have added a snipping tool of the result, and it works as expected.Br
Marius
mariussve1
3 years agoSolution Sage
I have uploaded a test .pbix file that are working.
Does not look like I have possibilites to upload the file. If needed, I can email it to you. Please let me know.
My measure looks like this: (Could you try to change yours as well, and use AND () instead of &.
Color measure =
SWITCH (
TRUE(),
AND ( SELECTEDVALUE('Table'[Vendor]) = "Vendor1", SUM ( 'Table'[Value] ) = 100 ), "#e30b5d",
AND ( SELECTEDVALUE('Table'[Vendor]) = "Vendor2", SUM ( 'Table'[Value] ) = 200 ), "#8e4585",
AND ( SELECTEDVALUE('Table'[Vendor]) = "Vendor3", SUM ( 'Table'[Value] ) = 150 ), "#077106",
AND ( SELECTEDVALUE('Table'[Vendor]) = "Vendor4", SUM ( 'Table'[Value] ) = 300 ), "#09387f",
AND ( SELECTEDVALUE('Table'[Vendor]) = "Vendor5", SUM ( 'Table'[Value] ) = 200 ), "#5851db"
)
I have added a snipping tool of the result, and it works as expected.
Br
Marius
sridhar71
3 years agoHelper I
please email it to [email protected]
- mariussve13 years agoSolution Sage
I have now emailed you the working .pbix file as agreed 🙂
BrMarius