cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sphillips1
Frequent Visitor

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

Highlighted
Sphillips1
Frequent Visitor

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 Helper II
Helper II

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
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,632)