web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / calculations and compo...
Power Apps
Unanswered

calculations and components

(0) ShareShare
ReportReport
Posted on by 44

Hello community!

 

I am investigating the possibility of using PowerApps to generate quotes for our business. Within this tool there will be several calculations that will need to be executed. Question is, would we be able to store all the calculations in Components and have those calculations executed in different Screens?

So one example would be I need to calculate the volume of business that we would book for the term of a contract. I would have a form where I would capture current volume, estimated increase per year, and term of the contract. With this info I would need to calculate the compound volume and have that entered into a "total volume" field. For example initial volume of 100000, with a 3% increase over a 5 year contract. 

If I was to put that formula use to calculate in a component, would that work? Would I be able to have the "total volume" field default to the formula in the component? Would I be able to reference the proper fields needed for the formula, that would exist on other screens?

I have been testing the formula within the form using;

With

( {p:TextInput2,     //Initial volume

        r: TextInput6,   //% increase

        t: TextInput16}, // Term

        p*(1+r)^(t)

)

This kinda works although getting the field to trigger the calculation has been inconsistent for some reason. In any case would this logic work in a component?

 

Any advice would be apreciated!

Thanks

Mark

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @MarkFay 

    If you have a total volume field in your data source that is a number type, you can do the calculation in PowerApps and save it to your Data Source.  It makes no difference where the textinput boxes are located in the app.  You can modify the Patch() beneath the button to include other fields in the data source such as an estimate number, customer, employee, etc. !1.png

  • MarkFay Profile Picture
    44 on at

    Thank you,

    I tried as you illustrated but I was unable to get the total volume to calculate.

    Capture1.JPG

    I created a form containing data cards (all in number format) pointing to my sharepoint list. Using the datacards instead of the text input, as you can see the DataCard that contains the calculation does not calculate. Didn't really expect it to act differently but thought I would try.

    Capture2.JPG

     

    Now what is interesting is if I go into the formula and make any changes (in this case I deleted the t and reentered) the calculation then appears.

    Capture3.JPG

     

    Once I save the form and then open a new item, the previous calculation remains in the total volume card.

     

    Capture4.JPG

     

    So it appears that the "total volume" card is not calculating real time.

     

    What could I be missing?

     

    Mark

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard