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

Community site session details

Session Id :
Power Pages - Power Apps Portals
Suggested answer

Calculation tools

(1) ShareShare
ReportReport
Posted on by 2
Dear community,
I am looking to creat an application for calculation.
Could you suggest for me exemples, trainings or turorial. 
Many thanks 
Categories:
I have the same question (0)
  • Suggested answer
    Jerry-IN Profile Picture
    182 on at
    Calculation tools

    Thank you for your question. The term "calculation tools" in Power Apps doesn't refer to a specific set of controls, but rather to the powerful combination of Power Fx formulas, user input controls, and display controls that allow you to perform any kind of calculation, from simple arithmetic to complex statistical analysis.

    Here’s a breakdown of the core components and patterns you can use to build calculation capabilities into your Power Apps.

    Core Components for Calculation
     
    • Formulas (Power Fx): This is the foundation of all calculations in Power Apps. The formula language is very similar to Microsoft Excel. You can use standard mathematical operators (+, -, *, /) and a wide range of built-in functions [, ].
      • Basic Math: Sum, Average, Min, Max, Power, Sqrt
      • Statistical: StdevP, VarP
      • Rounding: Round, RoundUp, RoundDown
    • Input Controls: These are how users provide the numbers for your calculations.
      • Text Input: The classic control for user input. Remember to use the Value() function to convert its text output into a number for calculations (e.g., Value(TextInput1.Text)).
      • Number Input (Modern Control): A newer, more specialized control designed specifically for numeric entry, which simplifies data validation.
      • Slider: Allows users to select a value from a predefined range.
    • Display Controls:
      • Label: The primary control used to display the result of a formula. You simply set its Text property to the calculation you want to perform.
    Example: Building a Simple Addition Calculator
    This example demonstrates the basic principle of calculation in Power Apps.
    • Add two Text Input controls to your screen and name them txtFirstNumber and txtSecondNumber.
    • Add a Label control to display the result.
    • Set the Text property of the Label control to the following formula:
    • Value(txtFirstNumber.Text) + Value(txtSecondNumber.Text)
    The label will now instantly display the sum of the numbers entered into the two text boxes.
     
    Advanced Calculation Techniques
    Once you master the basics, you can implement more sophisticated calculation patterns.
    • Named Formulas: For calculations you need to reuse across multiple screens, you can define them once in the App.Formulas property. This improves performance and makes your app easier to maintain. For example, you could define a global tax rate [, ].
      • In App.Formulas, you could write: SalesTaxRate = 0.07;
      • Then, in any Label control, you can calculate the tax on an item with: Value(txtItemPrice.Text) * SalesTaxRate
    • User-Defined Functions (UDFs): An extension of Named Formulas, you can create your own functions that accept parameters. This is perfect for complex, repeatable business logic.
      • Example: Create a function to calculate profit margin.
      • // In App.Formulas
      • CalculateProfitMargin(costPrice: Number, sellingPrice: Number): Number = (sellingPrice - costPrice) / sellingPrice;
      • Usage: In a label's Text property, you could call it like this: CalculateProfitMargin(Value(txtCost.Text), Value(txtSelling.Text))
    • External Calculations with Excel and Power Automate: For highly complex financial or engineering calculations that are already built into an Excel spreadsheet, you can use Power Automate to:
      • Take input values from your Power App.
      • Pass them to an Office Script that runs in your Excel file.
      • The script performs the calculation in Excel and returns the result to Power Automate.
      • Power Automate then sends the result back to your Power App.
      • This pattern is useful for leveraging existing Excel logic without having to rebuild it in Power Fx.
    By combining these controls and formula patterns, you can build anything from a simple calculator to a complex financial modeling tool directly within Power Apps.
     
    Best Regards,
    Jerald Felix
  • Lucas001 Profile Picture
    2,334 Super User 2025 Season 2 on at
    Calculation tools
     
    does the answer from @Jerry-IN helps you? Seems to be AI generated but still something you could give a try.
     
    Just asking several more questions here:
    - Do you really need a PowerPage for a simple calculator app?
    - Do you need external people to sign in or actually accessing your page?
     
    - Do you want to test the PowerPage itself or do you want to build something meant for production?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 85 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 54

#3
dgray304 Profile Picture

dgray304 39

Last 30 days Overall leaderboard