cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DeanRowland
New Member

Rounding within an existing formula

Hi,

 

I use this formula in our quoting app 

 

With({wprice:Price/1000+100},If(wprice<400,Text(400),Text(wprice)))

 

It uses house prices for "Price" so we sometimes get odd results like £1002

 

How would I add a round function so that wprice is set to the nearest £25 up or down?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

Hi @DeanRowland 

Looking at your formula, it appears as though you're converting the Price input value to thousands, and adding a 100k adjustment.

This will round the end result to the nearest £25k

With({wprice:Round((Price/1000+100)/25,0) * 25},
      If(wprice<400,Text(400),Text(wprice))
)

Hopefully, you can figure out how to adjust this if you want to actually round at the £ level.

View solution in original post

2 REPLIES 2
timl
Super User
Super User

Hi @DeanRowland 

Looking at your formula, it appears as though you're converting the Price input value to thousands, and adding a 100k adjustment.

This will round the end result to the nearest £25k

With({wprice:Round((Price/1000+100)/25,0) * 25},
      If(wprice<400,Text(400),Text(wprice))
)

Hopefully, you can figure out how to adjust this if you want to actually round at the £ level.

DeanRowland
New Member

Hi @timl 

Your description of how the formula works was confusing but the rounding you suggested works perfectly. It now returns a result to the nearest £25 which my sales team will be very happy about. 

Thank you for your help.

 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,160)