cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bmurphy1
Level: Powered On

Trying to make and Excel Calculator stype app

Hi folks, I'm totally lost and need your help.

 

I had my accounting team develop an excel calculator for our sales team.  It works great and I wanted to make it into an app, but the formulas don't seem to tranfer properly.  I'm not sure what I'm doing wrong.

 

I've got 10 rows and 2 columns.  The 1st column is just titles for what either needs to be inputed or the title of the result calculated.

         A                                            B

        Title                                  Calculations

1) Contract Amount            (Number Inputed)

2) Parts and Expense          (Number inputed)

3) Labor Hours                    (Number inputed)

4) Contract Duration           (Number inputed)

5) Current Monthly Rate     (Number inputed)

6) New Monthly Rate          (Number inputed)

7) IR Commission                 =B1*0.06

😎 RMR Commission            =IFS(B4=0,B6-B5,B4=1,B6-B5,B4=2,2*(B6-B5),B4>=3,4*(B6-B5))

9) Total Commission            =B8+B7

10) CM                                 =IFERROR((((B2+B3*90)+B9-B1)/(B5))+11,0)

 

I know in PowerApps you don't put "B1" but rather the name of the text box.  But I was never able to get this to work.  What am I doing wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
Er-PiTeam
Level: Powered On

Re: Trying to make and Excel Calculator stype app

You have to wrap each control with Value. See the first example I gave you for RMR and maintain that structure. Good luck!

View solution in original post

13 REPLIES 13
Dual Super User
Dual Super User

Re: Trying to make and Excel Calculator stype app

Hi @bmurphy1 

 

 (Number Inputed) - assuming this is a TextInput control in PowerApps named "TextInput1" (you can rename controls)

 

B1*0.06 would translate to  Value(TextInput1.Text)*0.06

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

bmurphy1
Level: Powered On

Re: Trying to make and Excel Calculator stype app

The short formulas aren't the ones I really need help with.  What do I need to do for the longer ones?



 

Er-PiTeam
Level: Powered On

Re: Trying to make and Excel Calculator stype app

Are you wrapping your .text control with Value?

Value(txtInput.text)?
Er-PiTeam
Level: Powered On

Re: Trying to make and Excel Calculator stype app

RMR Commission can be done the same way as you have it but with an IF instead of IFS. Powerapps will treat it the same way, just make sure you wrap your text inputs with value and your conditions and true values should work just fine.
bmurphy1
Level: Powered On

Re: Trying to make and Excel Calculator stype app

So if I renamed the text box to say "Price" for B1 and "IR" for B7, and if in Excel B7=B1*0.06, the in PowerApps IR needs to have a Value(IR.text)*0.06?

Er-PiTeam
Level: Powered On

Re: Trying to make and Excel Calculator stype app

That is correct @bmurphy1 

bmurphy1
Level: Powered On

Re: Trying to make and Excel Calculator stype app

So if:

B4 = Years

B5 = Old

B6 = New

B8 = RMR

 

Is this right?

RMR=IFS(Years=0,New.txt-Old.txt,Years=1,New.text-Old.Text,Years=2,2*(New.Text-Old.Text),Years>=3,4*(New.text-Old.text))

bmurphy1
Level: Powered On

Re: Trying to make and Excel Calculator stype app

@Er-PiTeam 

My formula doesn't work apparently.  I got all sorts of erros

Er-PiTeam
Level: Powered On

Re: Trying to make and Excel Calculator stype app

@bmurphy1  try this

RMR=

 

If(Value(Years.Text)=0,Value(New.Text)-Value(Old.Text),
Value(Years.Text)=1,Value(New.Text)-Value(Old.Text),
Value(Years.Text)=2,2*(Value(New.Text)-Value(Old.Text)),
Value(Years.Text)>=3,4*(Value(New.Text)-Value(Old.Text)))

 

You dont need the 'S' and i think you might need to wrap those text inputs as values.  But i dont know if that is required, but that is what i would do.

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,849)