cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
grapejuice
Helper III
Helper III

How to Prevent Formula from Calculating If Not number

Good day,


I have a formula looking at multiple, single line text.  ( i need single line text to allow user to input some values sometimes with text due to unit inconsistencies)

 

I would like the formula NOT to calculate when there a text or if it is blank. Or basically only calculate when all are Numbers.

 

I am trying to use !isnumeric but it seems not to be working.

 

Any advise is appreciated.

 

Thank you.

 

 

Edit - it seems isnumeric is something working, will reply if i got it to work

1 ACCEPTED SOLUTION

Accepted Solutions
poweractivate
Super User
Super User

@grapejuice 

 

Yes you can use IsNumeric

 

If you want sometimes to try and convert Text to Number initially and then fall back to not calculating if it fail, try using Value (this gives Blank() if the conversion fails, which can be checked by IsBlank)

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-value

 

Example - If someone enters 12.34%, Value("12.34%") converts it to 0.1234 instead of having to manually check for or handle this in some other way.

 

See if above helps in case.

View solution in original post

1 REPLY 1
poweractivate
Super User
Super User

@grapejuice 

 

Yes you can use IsNumeric

 

If you want sometimes to try and convert Text to Number initially and then fall back to not calculating if it fail, try using Value (this gives Blank() if the conversion fails, which can be checked by IsBlank)

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-value

 

Example - If someone enters 12.34%, Value("12.34%") converts it to 0.1234 instead of having to manually check for or handle this in some other way.

 

See if above helps in case.

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 (1,495)