Skip to main content

Numeric variance

This function varies the input numeric value, based on the percentage specified as an extra parameter.

This function applies only to numeric data types: Integer, Long, Float and Double.

Option Description
Extra parameter This function requires an extra parameter.

The extra parameter must be a number, this parameter represents a percentage of modification. The function modifies the input data by multiplying it by a number between the parameter and its opposite.

For example, if the input is 100 and the parameter is 10, then the generated value will be a randomly selected value between 90 (100 - 10%) and 110 (100 + 10%).

If the extra parameter is 0, it will be replaced with 10.

If the input is null, then the function will return 0.

In the following example, the masked value has been randomly selected between 5 (10 - 50%) and 15 (10 + 50%).

Input value Extra parameter Example of a masked value
10 "50" 7

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!