Announcements
Hello Community,
I have the next Spreadsheet with the next formula:
=IFERROR((1/(A2*B2))*C2,0)
How can I use the above formula into Power Apps field? thanks everyone.
Kind regards.
@esjimenezp
The math is that if A2 or B2 = 0 then there will we an error, so just check if for this condition, ie
If( lbs/gal = 0 || N = 0, // then, your error condition goes here 0, // else, your formula here ( 1 / lbs/gal * N ) * Cost ); // if you add three TextInput fields to add the 3 values, add this code to a label will demo the above If( Value(lbs_gal.Text) = 0 || Value(N.Text) = 0, // then, your error condition goes here 0, // else, your formula here ( 1 / Value(lbs_gal.Text) * Value(N.Text) ) * Value(Cost.Text) )
Assuming you would have textinput controls for A2, B2 and C2, then your formula would be:
IfError((1 / (Value(A2input.Text) * Value(B2input.Text)) ) * Value(C2input.Text), 0)
I hope this is helpful for you.
thanks for your messages, I used both formulas from @EddieE and @RandyHayes but I don't understand why the values are different in Power Apps.
This is the Excel file
and this is from Power Apps
There are missing something that I cannot see it? thanks
Kind regards👋
You haven't copied @RandyHayes formula correctly, you are missing a set of brackets here
(Value(A2input.Text) * Value(B2input.Text))
My original formula was also missing those brackets
Got it, now I have the next message, the formula was closed 😥
Kind regards 👋
My mistake I forgot a close bracket 🤣 and the both formulas works well thanks @RandyHayes and @EddieE I really appreciate your help 👋🙏
IfError((1 / (Value(txt_LbsPerGallon.Text) * Value(txt_N.Text)) ) * Value(txt_CostofProductLB.Text), 0)
One more question, why the value is not showing after added this format into the formula?
"#0.00"
IfError((1/(Value(txt_LbsPerGallon.Text)*Value(txt_N.Text)))*Value(txt_CostofProductLB.Text),0, "#0.00")
I just only need to show two digits
Your formula is not syntactically correct (parens out of order) and missing the Text function.
Should be:
Text( IfError( (1 / (Value(txt_LbsPerGallon.Text) * Value(txt_N.Text)) ) * Value(txt_CostofProductLB.Text), 0 ), "#0.00" )
I expanded it out just to highlight the parens.
I was thinking that I needed to add the Text, but I don't remember in which order to added, thanks again @RandyHayes for all your support.
No problem at all!! 😁
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 356 Most Valuable Professional
11manish 225 Super User 2026 Season 2
Mohsin Ali 211