cancel
Showing results for
Did you mean: Frequent Visitor

## Multiply a number based on the size of the number

I am trying to build a simple calculator the when I put in a number, x, it will be multiplied by another number, y.

if x is <= 50, y=5

if x is <= 100 and > 50, y=4.5

if x is <= 500 and > 100, y=4.0

if x is >500, y=2

After doing some googling this is what I have cobbled together:

(Value(TextInput.Text) * (If((Value(TextInput.Text) <= 50, 5 || If((Value(TextInput.Text) <= 100 > 50, 4.5 || If((Value(TextInput.Text) <= 500 > 100, 4, || If((Value(TextInput.Text) > 500, 2, 0))))) Any ideas or a new direction to try?

1 ACCEPTED SOLUTION

Accepted Solutions  Solution Sage

Please try below formula

Value(TextInput.Text) * (If(Value(TextInput.Text) <= 50, 5, If(Value(TextInput.Text) <= 100 && Value(TextInput.Text) > 50, 4.5, If(Value(TextInput.Text) <= 500 && Value(TextInput.Text) > 100, 4, If(Value(TextInput.Text) > 500, 2, 0)

)

)

)

)

Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.
3 REPLIES 3  Solution Sage

Please try below formula

Value(TextInput.Text) * (If(Value(TextInput.Text) <= 50, 5, If(Value(TextInput.Text) <= 100 && Value(TextInput.Text) > 50, 4.5, If(Value(TextInput.Text) <= 500 && Value(TextInput.Text) > 100, 4, If(Value(TextInput.Text) > 500, 2, 0)

)

)

)

)

Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily. Frequent Visitor

Thank you this worked perfectly! I was about ready to pull my hair out.  Solution Sage

Glad it worked 🙂

Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily. Announcements #### WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world. #### Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts. Top Solution Authors
Top Kudoed Authors
Users online (4,089)