cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Musky
New Member

Changing a circles color based on statistics

Hi there, 

 

I've been trying a few things out to change the color of a circle based on a number. My code doesnt work and looks like this: 

If ( Omzet <= 3999, "#FF000", Omzet >= 4000, "#32CD32")

Omzet is the field with a number in it. Can anyone help?

 

Musky

4 REPLIES 4
Highlighted
hpkeong Community Champion
Community Champion

Re: Changing a circles color based on statistics

hi

Can you just use
- Color.Red or others to replace the code?
Have a nice day.
hpkeong
Musky
New Member

Re: Changing a circles color based on statistics

Thanks for replying hpkeong,

I've tried this and I got this error:

 ErrorPowerApps.png

I placed this code in the "Fill" option from the circle. Is this even possible to put code in there?
Thanks in advance,

Musky

hpkeong Community Champion
Community Champion

Re: Changing a circles color based on statistics

Hi

 

Can you look at this screenshot?

Meantime, ColorValue( "#f0f8ff" ) is the correct code (if you wish to use Hex Code)

 

Screenshot (330).pngtry on both Color.Green & Hex Code

hpkeong
Musky
New Member

Re: Changing a circles color based on statistics

Hey hpkeong,

 

I've got it to work right now, thanks alot for the help, it really helped. The final outcome:
If (ThisItem.Omzet <= 3999, Color.Red, Color.Green)

(**I didnt even call the "omzet" in the first code I posted here, because of the ThisItem I suppose**) Can u tell me if I'm right?

 

Musky~ 

 

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (8,436)