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 / Change fill colour of ...
Power Apps
Answered

Change fill colour of a label based on a numerical value (%) of a set figure.

(0) ShareShare
ReportReport
Posted on by 580

Hi All,

 

I have some sum() formulas in my powerapp which are adding up certain data around my app and displaying the results in a gallery. 

 

All values are basically staff hours on a training program. So for example, some staff on a set training pathway have to gain 150 hours of experience. 

 

What I would like to do is:

If the total hours equals less than 50% of 150 then the fill colour is RED

If the total hours equals 50% to 75% of 150 then the fill colour is ORANGE

If the total hours is over 75% and over of 150 then the fill colour is GREEN

 

I've had a look around and I cant find anything that I can use - anyone with any ideas?

Categories:
I have the same question (0)
  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @AdamH 

    Please try the following,

    If(varTotalHours>112.5, Green, varTotalHours>=75, Orange, Red)

  • AdamH Profile Picture
    580 on at

    Hi @CNT 

     

    That returned all Fill colours as red - even if the value was 150.

    2021-11-25 19_58_02-Window.png2021-11-25 19_57_36-Window.png

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @AdamH The operator is > NOT >=

  • AdamH Profile Picture
    580 on at

    @CNT 

     

    Same result I'm afraid.

    2021-11-25 20_26_57-Window.png

     

    I'll include the items of the gallery just in case that has an impact..

    2021-11-25 20_30_12-Window.png

  • Verified answer
    CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @AdamH replace nqphoursGlobalVariable with Value(Self.Text)

  • AdamH Profile Picture
    580 on at

    Winner! - Thanks @CNT 

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @AdamH 

    Glad it help!

     

    Please remember to give a 👍 and accept my solution as it will help others in the future.

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 377 Most Valuable Professional

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard