Forum Discussion
Conditional formatting for each matrix row
- 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
Hi,
You can create a measure to be used with conditional formatting;
Color measure =
SWITCH ( TRUE(),
SELECTEDVALUE (Table[In charge]) = "Vendor1" & SUM(Table[ValueColumn]) >= 300, "#F3F2F1",
SELECTEDVALUE (Table[In charge]) = "Vendor2" & SUM(Table[ValueColumn]) >= 200, "#666666"
)
Br
Marius
Thanks for reply.
How will the measure be applied after we create it?
- mariussve13 years agoSolution Sage
Hi again,
When you are in the conditional formatting pane you need to choose field value in the format style:
Marius
- sridhar713 years agoHelper I
I tried that and it is not letting me choose the measure as an option
After I click on Color Measure
- mariussve13 years agoSolution Sage
Can you put the measure in the Matrix and ensure there is no error in it? When I have the issue of choosing measure in the field value its because the measure has error in it
Marius