cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TestUser112233
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)))))

 

TestUser112233_0-1660242823713.png

Any ideas or a new direction to try? 

1 ACCEPTED SOLUTION

Accepted Solutions
NandiniBhagya20
Solution Sage
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.

View solution in original post

3 REPLIES 3
NandiniBhagya20
Solution Sage
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.

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

NandiniBhagya20
Solution Sage
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.

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

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 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (4,089)