In this blog, we’ll go over how to make an easy calculator with PowerApps. We’ll create a calculator in Power Apps step-by-step.
The first step in performing any calculation (such as addition, subtraction, multiplication, or division) is to establish a calculator in PowerApps.
The following steps will show you how to develop a calculator in the canvas app:
Using the PowerApps Canvas programme, I made the simple calculator you see in the screenshot below. With the use of many operators, including addition (+), subtraction (-), multiplication (*), and division (/), this PowerApps calculator can calculate any number.
Similarly, you can click on the AC button as shown below to reset the entered digits.
You must insert the following input controls and rename them as described below in order to create this.
Five buttons for adding operators, two textboxes for number input, one label for results, and one label for the header title are all added.
Select the First Number Text input box after that, then format the field value as a number (go to Properties -> Format -> Select Number).
Similar to the screenshot below, choose the Second Number Text input box and format the field value as a Number.
Next we must add a formula to each button’s onselect property.
On ‘+‘ = UpdateContext({Result: textInput1 + textInput2 });
On ‘–‘ = UpdateContext({Result: textInput1 – textInput2 });
On ‘*‘ = UpdateContext({Result: textInput1 * textInput2 });
On ‘/‘ = UpdateContext({Result: textInput1 / textInput2 });
Set the label’s text property with the result of clicking on it. You can also change its display properties.
Next Save and Run the app.
Now Test the app