Forum Discussion
COLOR CAPTION
Yes I understand, but in my case, I need the conditional formatting, as I have 4 different situations, where the color should change, and I don't have those situations in one column.
Because of this, I need to use conditional formatting.
The rule is:
ID=1 and Status=F
ID=1 and Status=P
ID=2 and Status=F
ID=1 and Status=P
DAX:
CorPreenchimento_K =
SWITCH(
TRUE(),
SELECTEDVALUE('MODELO DADOS'[ID_EMP]) = 1 && SELECTEDVALUE('MODELO DADOS'[STATUS]) = "F", "#F29100",
SELECTEDVALUE('MODELO DADOS'[ID_EMP]) = 1 && SELECTEDVALUE('MODELO DADOS'[STATUS]) = "P", "#000000",
SELECTEDVALUE('MODELO DADOS'[ID_EMP]) = 2 && SELECTEDVALUE('MODELO DADOS'[STATUS]) = "F", "#BB0000",
SELECTEDVALUE('MODELO DADOS'[ID_EMP]) = 2 && SELECTEDVALUE('MODELO DADOS'[STATUS]) = "P", "#000000",
"#000000"
)
I have both filters on the screen, according to the filters the color should change.
The DAX is working correctly, the colors are changing, but in the legend it does not change, it remains blue.
Hi Anonymous ,
As Avinash mentioned, conditional formatting is used to highlight specific conditions/outliers in a trend.
This means that usually in a category the conditional format may have more than one color, but a category can only have one color, which is why it is difficult for the color of the legend to change dynamically along with the color of the bar chart.
You can submit the idea here:
Welcome to Microsoft Fabric Ideas
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum