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
rbreneman
Helper II
Helper II

Conditional Formatting with percent not working as expected

Hi!

I'm having trouble getting conditional formatting on a matrix visual working the way I want. I feel like this is harder than it should be. Screenshot below shows the rules I have in place. Basically I want negative numbers to be red, zero to be black, and positive numbers to be green. I suspect some of the issue might be rounding but I'm not sure how to overcome. Like for example, 0% may be -0.123 but because I'm showing no decimal places it displays as 0%. Would someone be able to help me with the magic rules that I need to make this work? Thanks so much!

 

Matrix-ConditionalFormatting.png

1 ACCEPTED SOLUTION
selimovd
Super User
Super User

Hey @rbreneman ,

 

with the dialogue you cannot round numbers like when it'r rounded 0 it should be black.

For that you would have to use a measure.

 

Otherwise you can do it with numbers and remove the number to also format correctly for the Maximum/Minimum. In your case number above 100% wouldn't get a color:

selimovd_0-1629472892073.png

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

4 REPLIES 4
rbreneman
Helper II
Helper II

Thanks everyone! Kinda figured I might have to use a measure to get exactly what I wanted, but wasn't entirely sure. I appreciate all the help you provided.

v-kkf-msft
Community Support
Community Support

Hi @rbreneman ,

 

When you keep the integer digits, the data will be rounded, you can modify the rules according to the following example range. (In my example data, Measure = SUM('Table'[Value]) / 100)

 

image.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

selimovd
Super User
Super User

Hey @rbreneman ,

 

with the dialogue you cannot round numbers like when it'r rounded 0 it should be black.

For that you would have to use a measure.

 

Otherwise you can do it with numbers and remove the number to also format correctly for the Maximum/Minimum. In your case number above 100% wouldn't get a color:

selimovd_0-1629472892073.png

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 
nvprasad
Solution Sage
Solution Sage

Hi rbreneman,

 

It may be higher than 0%. Please expand to 2 decimals and check.

Also, I suggest you use number on the conditional formatting page instead of percentage.

Appreciate a Kudos! 🙂
If this helps and resolves the issue, please mark it as a Solution! 🙂

Regards,
N V Durga Prasad

 

 

 

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