cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
zalandoe
Level: Powered On

Change Icon Color based on Number Value (Simple!)

My app currently tracks the number of days since we last invoiced our client with a DateDiff function

DateDiff(DataCardValue12.SelectedDate,Today())

 

I have placed circle icons on my app that I want to change color based on how many days it has been since the invoice has been sent (like a color status update).

 

A green circle for most recent and red being a very long time.

 

It seems sooooo easy but I cannot figure it out. Here is my if statement in the fill property of a circle:

If('Number of Days' > 1, Green, LightGray)

 

*Number of Days is name of the text label where the DateDiff function is found

 

The error I get is that If statement is expecting a number but I've tried 'Number of Days'.Value and that doesn't work either.

 

Thanks for the help!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Change Icon Color based on Number Value (Simple!)

Hi @zalandoe 

 

If(Value('Number of Days'.Text) > 1, Green, LightGray)

 

Regards,

Reza Dorrani

 

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

View solution in original post

5 REPLIES 5
Dual Super User
Dual Super User

Re: Change Icon Color based on Number Value (Simple!)

Hi @zalandoe 

 

If(Value('Number of Days'.Text) > 1, Green, LightGray)

 

Regards,

Reza Dorrani

 

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

View solution in original post

zalandoe
Level: Powered On

Re: Change Icon Color based on Number Value (Simple!)

Thanks so much! I thought I had tried that solution at one point and dismissed it completely!

TheRobRush
Level 8

Re: Change Icon Color based on Number Value (Simple!)

 

help.png

 

zalandoe
Level: Powered On

Re: Change Icon Color based on Number Value (Simple!)

Woah, that is great. Thanks!

TheRobRush
Level 8

Re: Change Icon Color based on Number Value (Simple!)

haha oops he beat me to it

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,849)