Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Jasonvl
Frequent Visitor

Conditional formating on bar chart showing % from a measure?

Hi,

 

I have a measure that works out a calcuation and returns it as a percentage in a stacked column chart.

 

I would like the columns to be a specific color based on the percentage value - red under 60%, yellow between 60% and 74% and green for 75% and above.

 

I've found the conditional color formating under advanced controls within the data colors section for the visual but setting up the three rules to change the colors does not produce the desired results, it will only ever apply one color to all the bars and not a different color based on the value of the bars.

 

If I use the Format by color scale option then it does work but it's doing colors based on a scale so the lowest is red and the highest is green but I want to specify which values should be which color?

 

Am I missing something or is it just that this particular example doesn't work in this way?

 

Regards, Jason.

1 ACCEPTED SOLUTION

@Jasonvl the issue is with the value, if your value is in % you should be entering the values like this

75% should be .75

100% should be 1

 

Please update the conditions as suggested above and it should work



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

5 REPLIES 5
parry2k
Super User
Super User

@Jasonvl conditional color should work, can you share how you are assigning conditional formatting. May be screen shot.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @parry2k , thanks for responding.

 

Please see below, as you can see all the bars are red even though 1st one being over 75% should be green and the 2nd one has a value of 70% which is below 75% and should according to the rules be colored yellow?

 

Chart.png

@Jasonvl the issue is with the value, if your value is in % you should be entering the values like this

75% should be .75

100% should be 1

 

Please update the conditions as suggested above and it should work



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@Jasonvl wooo hooo I like it. cheers!!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2kThank you sooo much, that worked a treat Smiley Very Happy

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors