I have a canvas powerapp with text input fields. I want to perform calculations such as multiplication and division then display the result on the same screen. How can I achieve this?
Example:
Hi @jms0529 ,
you can try this
Text(1 - (Value(TextInput1.Text) / Value(TextInput2.Text)), "0.0%")
I hope this helps you set up your calculation in the app! If you find this solution helpful, feel free to accept it. 😊
Hi @jms0529 ,
To perform and display calculations in a PowerApps canvas app, you can use labels to show the result. Here's a simple guide:
Add Text Inputs: Place two Text Input controls on the canvas for users to enter numbers (TextInput1 and TextInput2).
Perform Calculation: Write a formula to perform the calculation based on the values entered in the text inputs. Use the Value() function to convert text to number.
Display Results: Use a Label control to display the result. Set its Text property to the calculation formula.
Here's a step-by-step example:
Add two Text Input controls (TextInput1 and TextInput2).
Add a Label to the canvas to display the result.
Set the Text property of the result Label to the following formula:
Text(1 - (Value(TextInput1.Text) / Value(TextInput2.Text)), "0.0%")
The Value() function converts text to a number, and the Text() function formats the number as a percentage with one decimal place.
Make sure that the input fields are set to accept only numerical input to prevent errors in the calculation.
If you want to store the result in a variable and use it elsewhere in your app, you can use the Set() function on some event (like OnChange of the text inputs) to perform the calculation and store the result. For example:
// OnChange property of TextInput1 or TextInput2
Set(
ResultVariable,
1 - (Value(TextInput1.Text) / Value(TextInput2.Text))
);
hen set the Text property of the Label to:
Text(ResultVariable, "0.0%")
By following these steps, you will be able to perform the calculation and display the result on the same screen in your PowerApps canvas app.
Best Regards,
Hassan Raza
Hi @jms0529 ,
To perform and display calculations from two input fields in Power Apps:
Use two Text Input controls (e.g., TextInput1, TextInput2) for users to enter numbers.
Place a Label control to show the result.
Set the Text property of the Label to:
If(
IsNumeric(TextInput1.Text) && IsNumeric(TextInput2.Text) && Value(TextInput2.Text) <> 0,
Text(
1 - (Value(TextInput1.Text) / Value(TextInput2.Text)),
"0.0%"
),
"Invalid input"
)
This formula calculates the result when both inputs are numeric and the second input is not zero, then formats it as a percentage. If the inputs are not valid, it displays "Invalid input".
Please accept this solution if it resolves the issue. ✅
Best regards,
Muhammad Ali
WarrenBelz
78
Most Valuable Professional
MS.Ragavendar
42
mmbr1606
41
Super User 2025 Season 1