A variable is an element used in programming that is like a box in which data is named and stored,
They can store a variety of data with certain restrictions.
The ability to utilize variables makes a big difference in what you can do with Power Automate.
Variable type: Float handles numbers with a small part of the decimal point.
How to use
To use a variable, it must first be initialized. Without initialization, the variable will not be registered as a variable.
To do so, select the "Variable" connector under "Built-in" when adding a step to the flow.
Select "Initialize variable" from the "Actions" menu.
Specify the name and type of the variable.
Select "Float" for the type.
The value is the content of the variable to be specified first.
To set a value to a variable, use the "Set variable" action in the "Variable" connector.
Increase or decrease in value.
Use the "Increase Variable" or "Decrease Variable" actions in the "Variables" connector.
This allows you to increase or decrease the value by a specified value.
In the same way as in the "Set Variable" action, the target variable and the value to be increased or decreased are set for both increasing and decreasing.
Set calculation results
Math functions can be used to set the results of four arithmetic operations and other operations to variables.
To do so, display the Dynamic Content window and specify the expression.
For example, if the expression is " add(3.5,2.1)" using the addition function, 3.5+2.1 will be calculated and 5.6 will be set to the variable.
It is available for both variable setting and increase/decrease actions.
It is also possible to incorporate already existing variables into an expression. (You are more likely to use variables in expressions.)
To do so, select the variable from the dynamic content when setting up the expression, or Variables function with the name of the variable enclosed in parentheses '.
In the example below, float1 (content 3.5) and 2.1 are set to the result of the mul function (multiplication) to float2.
float2 is set to the result, 7.35.
However, the target variable cannot be incorporated into the expression.