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

Greater Than conditional formating

Hello,

I am new to powerapps and this forum. I have used this are as a resource for a lot of my Powerapps questions. So I decided to reach out to the commuity to see if I can get an answer.

 

Issue
I am trying to get a Datacardvalue box inside a display from to display a red background when the value is not equal to or greater than X value.
I have tried to use a rule to accomplish this but have had no success. Attached are screen shots of the desired results that were achieved by using a powerapp made condition: score_DataCard1.Default = "123"
When I try: score_DataCard1.Default < "123" I get the error "invalid argument type. Expecting a number value". No matter how I try and format the condition I get the same error.
Any help would be great. This would be a cool feature to have for my app but it will not stop my deveploment.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Greater Than conditional formating

One of the issues is that you are trying to use a math operator "<" with a string.  Try adding the following formula to the Fill property of the DataCardValue you want to change colors.

 

If(Value(DataCardValue4.text) < 123, RGBA(255, 0, 0, 1)RGBA(255, 255, 255, 1))

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Greater Than conditional formating

One of the issues is that you are trying to use a math operator "<" with a string.  Try adding the following formula to the Fill property of the DataCardValue you want to change colors.

 

If(Value(DataCardValue4.text) < 123, RGBA(255, 0, 0, 1)RGBA(255, 255, 255, 1))

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Sphillips1
Level: Powered On

Re: Greater Than conditional formating

Thank you so much! What a great solution! I get so hyper focused on one way of doing things I can't see the other ways to acheive the goal.

Robertjde
Level: Powered On

Re: Greater Than conditional formating

I have a similar problem and hope you can help me?
I would like to use the IF function to adjust the filling of the label depending on the score.
0-50% = RED, 51-84% = Orange, 85-100% = Green

What should the formula look like?

I would be very grateful for an answer!

Best wishes

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,190)