web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Conditional Formatting...
Power Apps
Answered

Conditional Formatting based on Percentage Value

(0) ShareShare
ReportReport
Posted on by 150

Hey all,

 

I have a Field that is View Percentage in an Edit Form and I wanted to have the fill color be Red if it is less than or equal to 50%, Yellow if it is between 51% and 75% and Green if it is greater than or equal to 76%. 

 

In trying to test just the first part, the value in the field currently is 80% and I have this in the fill property:

 

(If(ThisItem.CurrentYieldPercentage<= Value("50%"), Red,Blue))

 

It changes the fill color to Red which wouldn't satisfy the formula. 

 

This is what is in the text portion of the field:

 

Round(((Parent.Default - Parent.Min) / (Parent.Max - Parent.Min)) * 100, 2) & "%" (This was there when the field was added)

 

Anyone have any clue how to accomplish this? 

 

Thanks!

 

 

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Danny_L 

    Change your Fill property to the following:

    If(Value(Self.Text) > .75, Green,
     Value(Self.Text) > .5, Yellow, 
     Red
    )

     

    That should give you what you want.

     

    I hope this is helpful for you.

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    Hi @Danny_L ,

     

    If your CurrentYieldPercentage is a number column, I think that's wise to correct your formula as:

    If(ThisItem.CurrentYieldPercentage <= 0.5, Red,
     ThisItem.CurrentYieldPercentage > 0.5 && ThisItem.CurrentYieldPercentage <= 0.75,Yellow,
     Red
    )

    The text property value doesn't affect the color property (or maybe I don't get correctly the hole imagine).

     

    Hope it helps !

  • Danny_L Profile Picture
    150 on at

    Thanks @RandyHayes . I think I need to put you on retainer, haha. Again appreciate it

  • leslie_rivera Profile Picture
    373 on at

    @RandyHayes  How about based on percentage value between two numbers?

    Basically, I have an app where chemists are entering numbers. I already have calculations in the background that provide a final percentage.

     

    What I need is those percentage fields need to be color formatted:  
    Green for OK(the numbers are within .2 of each other) and Red for something is wrong (are not within .2)

     

    Using the graph below. Ash 1 calculation is 13.39% and Ash 2 calculation is 13.4% .

     

    If Ash 1 and Ash 2 are within .2 of each other the box should stay green -> if not it should turn red.

     

    I tried using this formula in the fill value of both fields:  If(Value(Ash1.Text)-(Ash2.Text)<=.2,Green,Red)

    However, it sometimes works. Any ideas on how I can write this one?

     

    graph1.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard