Forum Discussion
Conditional Formatting on Bar chart
I want to colour code my bar chart based on %value on my measure like if % <50 then Red when % between 50-90 then yellow and above 90 green. Used conditional formating option on Data colour Card. working Ok when i am selecting whole data but when i am filtering one Graph then this colour coding on graph is mashing up. Do we have any solution for this?
Thanks for reaching out,
yes this been resolved, I used number instead of % for my conditioning formating and it worked, but I wonder why I was not able to do this with % ,when my measure was like numerator/Denominator and formated this as %.
5 Replies
- Greg_DecklerCommunity Champion
Can you post an image of your rules?
- amitchandakSuper User
Did not get it can you elaborate.
In between refer
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting
You can create a color measure like this and use after using fields in advance control
Color sales = if(AVERAGE(Sales[Sales Amount])<170,"green","red")
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
- v-lid-msftCommunity Support
Hi manju_yadav ,
Does this issue have been resolved?Could you please provide more details about it If it still not be resolved, Such as the screenshot of condition format and the formula of measure you used? Please don't contain any Confidential Information or Real data in your reply.
Best regards,- manju_yadavRegular Visitor
Thanks for reaching out,
yes this been resolved, I used number instead of % for my conditioning formating and it worked, but I wonder why I was not able to do this with % ,when my measure was like numerator/Denominator and formated this as %.
- v-lid-msftCommunity Support
Hi manju_yadav ,
Because when using percent in rules of conditional format, it means percent of biggest value, such as in second screenshot, when using number, the 90% means 90%, but when using percent as rules, it means 90%/1500%=6%, and 90%/90%=100% in first screenshot.
By the way, PBIX file as attached.
Best regards,