cancel
Showing results for
Did you mean:
Helper I

## Calculation problem.

I have three boxes, Green, yellow and red, they are text input. I have a sum it is text label.
I want to be able to calculate the % and if the percentage is <30 then 1, >30 to <60 then 2 and >60 3.
For example. 45/100 *100 = 45% then there should be a 2 in the text label

1 ACCEPTED SOLUTION

Accepted Solutions
Super User

Hello @Bergh

This is would be the answer:

``````If(Value(SecretDecimalResult.Text) < 30, "1",
If(Value(SecretDecimalResult.Text) >= 30 And Value(SecretDecimalResult.Text) <=60, "2",
If(Value(SecretDecimalResult.Text) > 60, "3",
"")))``````

I created another label named SecretDecimalResult.Text which will be hidden.

This is the same as the Percentage sign but without the % so I can convert it to a number for comparison.

##### Just in case my answer helped you solve your problem, please mark/accept this as a SOLUTION. This helps community members if they experience a similar issue in the future.

###### bistek.space@charv3n@BisTekSpace
Super User

Hello @Bergh

This is would be the answer:

``````If(Value(SecretDecimalResult.Text) < 30, "1",
If(Value(SecretDecimalResult.Text) >= 30 And Value(SecretDecimalResult.Text) <=60, "2",
If(Value(SecretDecimalResult.Text) > 60, "3",
"")))``````

I created another label named SecretDecimalResult.Text which will be hidden.

This is the same as the Percentage sign but without the % so I can convert it to a number for comparison.

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