Forum Discussion
Power BI won't recognize data for conditional formatting
I have a chart which the title will change colors depending on the value of the data.
For example:
Green for "0", yellow for "1" and red for "2".
To get this values I created a measure which will bring these values depending on the month (filter).
The formula:
- Anonymous2 years ago
Hi Leo,
//Another weird thing that happens is if I substitute the formula MONTH(SELECTEDVALUE('PBI Finance DB'[Date])) for a value, like "4", the conditional formatting will work as it should be.
Does the filter context for PBI Finance DB'[Date] contain multiple values? It will return the second parameter by default when it contains multiple values, which is now blank.
Try the following code.
MONTH(SELECTEDVALUE('PBI Finance DB'[Date],MAX('PBI Finance DB'[Date])))
Best Regards,
Gao
Community Support TeamIf 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 -- China Power BI User Group
1 Reply
- AnonymousNot applicable
Hi Leo,
//Another weird thing that happens is if I substitute the formula MONTH(SELECTEDVALUE('PBI Finance DB'[Date])) for a value, like "4", the conditional formatting will work as it should be.
Does the filter context for PBI Finance DB'[Date] contain multiple values? It will return the second parameter by default when it contains multiple values, which is now blank.
Try the following code.
MONTH(SELECTEDVALUE('PBI Finance DB'[Date],MAX('PBI Finance DB'[Date])))
Best Regards,
Gao
Community Support TeamIf 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 -- China Power BI User Group