CALCULATENX

Metadata Instruction: Perform a floating point mathematical calculation with no rounding function applied or type cast a string into an floating point / decimal number with precision intact.
Edited By : Sobhit Sharma

Use Cases - When to use this command

Description

CALCULATENX evaluates a mathematical expression and stores the output of the expression in another variable. There is no rounding function applied to the output of the mathematical calculation.

Guidelines for Usage:

How to use this command

CALCULATENX command is for node level operations. It can be used in any node as an instruction, except for the root node. It should not be used as arrow text.

Let's take an example: CALCULATENX $output_variable "200.156 * (12 / 100)"
Here, "$output_variable" is where the result of the expression "200.156 * (12 / 100)" will be stored.
If you had a tree variable "$percent_rate" which was previously initialized to 12, the above expression could have also been "200.156 * ($percent_rate / 100)"

Examples

Simulated Metadata Editor
processing icon
Analytics API Call Body
Analytics API Response Body