cancel
Showing results for
Did you mean:
Helper IV

## color of negative number in text label

I am using below formula for the color text label

If(RoundDown(ThisItem.Mins/60,0) = -8 || RoundDown(ThisItem.Mins/60,0) = -9 || RoundDown(ThisItem.Mins/60,0) = -10 || RoundDown(ThisItem.Mins/60,0) = -11 || RoundDown(ThisItem.Mins/60,0) = -12 || RoundDown(ThisItem.Mins/60,0) = -13 || RoundDown(ThisItem.Mins/60,0) = -15 || RoundDown(ThisItem.Mins/60,0) = -16 || RoundDown(ThisItem.Mins/60,0) = -17 || RoundDown(ThisItem.Mins/60,0) = -18 || RoundDown(ThisItem.Mins/60,0) = -19 || RoundDown(ThisItem.Mins/60,0) = -20 || RoundDown(ThisItem.Mins/60,0) = -21, Green, red)

But this formula is showing  -17,-18,-20,-21 as red color but I formulate these as green.

1 ACCEPTED SOLUTION

Accepted Solutions
Most Valuable Professional

Two things - please give your posts a subject as requested a number of times previously - this forum is for the benefit of everyone, particularly future users. Also, you can shorten your code to this

``````With(
{wMins: RoundDown(ThisItem.Mins/60,0)},
If(
wMins <= -8 && wMins > -22,
Green,
Red
)
)
``````

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

MVP (Business Applications)   Visit my blog Practical Power Apps

3 REPLIES 3
Most Valuable Professional

Two things - please give your posts a subject as requested a number of times previously - this forum is for the benefit of everyone, particularly future users. Also, you can shorten your code to this

``````With(
{wMins: RoundDown(ThisItem.Mins/60,0)},
If(
wMins <= -8 && wMins > -22,
Green,
Red
)
)
``````

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

MVP (Business Applications)   Visit my blog Practical Power Apps

Helper IV

When I am using this formula then -22,-23 are also coming as green but I want them as red.

Most Valuable Professional

I assume working now (see revised post)

Announcements

#### April 4th Copilot Studio Coffee Chat | Recording Now Available

Did you miss the Copilot Studio Coffee Chat on April 4th? This exciting and informative session with Dewain Robinson and Gary Pretty is now available to watch in our Community Galleries!   This AMA discussed how Copilot Studio is using the conversational AI-powered technology to aid and assist in the building of chatbots. Dewain is a Principal Program Manager with Copilot Studio. Gary is a Principal Program Manager with Copilot Studio and Conversational AI. Both of them had great insights to share with the community and answered some very interesting questions!     As part of our ongoing Coffee Chat AMA series, this engaging session gives the Community the unique opportunity to learn more about the latest Power Platform Copilot plans, where we’ll focus, and gain insight into upcoming features. We’re looking forward to hearing from the community at the next AMA, so hang on to your questions!   Watch the recording in the Gallery today: April 4th Copilot Studio Coffee Chat AMA