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 with <> and colors

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

I am doing a project where I what to know if something is over a time limit to color it a certain color, or if it's under a certain time limit it colors the box a different color. Here is what I have so far:

 

If(
Value(Lastupdate.Text)> 1,
Hours, Color.Chartreuse=Green,
Value(Lastupdate.Text)< 2,
Hours, Color.Red=Red,
Color.Yellow=Yellow
 
Any ideas on how to fix this?
Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    In the textbox you want to change the color of, in the Color property, use this:

    If(And(Value(Lastupdate.Text)>=1,Value(Lastupdate.Text)<2),Green,If(Value(Lastupdate.Text)<=2,Red,Yellow))

    ---
    If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up. 

  • Verified answer
    iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Hey @Anonymous,

     

    Could we get some more details on what scope you want the colours to fall in - I am going to assume all values up until 1 are Green, 1 to 2 are orange and anything greater than 2 is red - would that be correct?

     

    I am going to try to make the code more visually-friendly so that you don't have to dissect it several months later when reviewing it:

     

    If(
     //Condition 1
     Value(Lastupdate.Text)>=0 && Value(Lastupdate.Text)< 1,
     Chartreuse, 
    
     //Condition 2
     Value(Lastupdate.Text)>=1 && Value(Lastupdate.Text)<=2,
     Yellow,
     
     //Else condition (any value larger than 2)
     Red
    )

     

    Can we assume that your Lastupdate is a label and that it shows numbers values such as 1.5 ?

     

    Let me know if this helps or if you need any further information with implementing this,

     

    Cheers,

    Sancho

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard