For Calculated Measures, Flow provides several built-in functions similar to what you would find in standard spreadsheet applications. In addition to the built-in functions, Flow allows you to create your own User Defined Functions.
Built-in Functions
Flow includes the following built-in functions:
Aggregates.Sum:
Returns the sum of a range of numbers.
Parameter | Description |
values | A comma-separated list of values or an array of values |
Aggregates.Average:
Returns the average of a range of numbers.
Parameter | Description |
values | A comma-separated list of values or an array of values |
Aggregates.Min:
Returns the smaller of a range of numbers.
Parameter | Description |
values | A comma-separated list of values or an array of values |
Aggregates.Max:
Returns the largest of a range of numbers.
Parameter | Description |
values | A comma-separated list of values or an array of values |
Aggregates.Mean:
Returns the statistical average of a range of numbers.
Parameter | Description |
values | A comma-separated list of values or an array of values |
Aggregates.StandardDeviation:
Returns the unbiased population standard deviation from the provided values.
Parameter | Description |
values | A comma-separated list of values or an array of values |
Aggregates.Histogram:
Returns the value of the distribution for the specified bucket.
Parameter | Description |
values | An array of values |
buckets |
The total amount of buckets (n) for the distribution Each bucket size is determined by dividing the range (maximum-minimum) into buckets of equal size. |
bucket to return | the bucket to be returned, where 0 is the first bucket and (n-1) is the last bucket |
Conditional.If:
Conditional if statement that returns the first number if a condition is true otherwise returns the second number.
Parameter | Description |
condition | A Boolean (true/false) value that determines which number to return |
trueValue | A double-precision floating-point value to return if the condition is true |
falseValue | A double-precision floating-point value to return if the condition is false |
Conditional.IfNull:
Conditional if statement that returns the first number if it is not equal to null otherwise returns the second number.
Parameter | Description |
value | A double-precision floating-point value |
defaultValue | A double-precision floating-point value to return if the value parameter is equal to null |
Logarithmic.e:
Represents the natural logarithmic base, specified by the constant, e.
Logarithmic.Exp:
Returns e raised to the specified power.
Parameter | Description |
power | A double-precision floating-point value |
Logarithmic.Log:
Returns logarithm of a specified number in the natural (base e) or to the specified base.
Parameter | Description |
value | A double-precision floating-point value |
base | (Optional) Numeric base of the logarithm to use |
Logarithmic.Log10:
Returns the base 10 logarithm of a specified number.
Parameter | Description |
value | A double-precision floating-point value |
Logical.And:
Returns true if all of the conditions specified are true.
Parameter | Description |
conditions | A comma-separated list of conditions or an array of conditions |
Logical.Or:
Returns true if any of the conditions specified are true.
Parameter | Description |
conditions | A comma-separated list of conditions or an array of conditions |
Logical.XOr:
Returns true if an odd number of the conditions specified are true.
Parameter | Description |
conditions | A comma-separated list of conditions or an array of conditions |
Logical.Not:
Returns true if the condition specified is false.
Parameter | Description |
conditions | A Boolean value |
Number.Floor:
Returns the largest integer less than or equal to the specified number.
Parameter | Description |
value | A double-precision floating-point value |
Number.Ceiling:
Returns the smallest integer value that is greater than or equal to the specified number.
Parameter | Description |
value | A double-precision floating-point value |
Number.Round:
Rounds a value to the nearest integer; or to the specified number of fractional digits.
Parameter | Description |
value | A double-precision floating-point value |
digits | (Optional) Number of digits to round the value to |
Number.Truncate:
Calculates the integer part of a specified number.
Parameter | Description |
value | A double-precision floating-point value |
Number.Sqrt:
Returns the square root of a specified number.
Parameter | Description |
value | A double-precision floating-point value |
Number.Pow:
Returns a specified number raised to the specified power.
Parameter | Description |
value | A double-precision floating-point value |
power | The power to raise the value to |
Number.Remainder:
Returns the remainder resulting from the division of a specified number by another specified number.
Parameter | Description |
value1 | A double-precision floating-point value |
value2 | A double-precision floating-point value |
Number.Abs:
Returns the absolute value of a number.
Parameter | Description |
value | A double-precision floating-point value |
Trigonometry.PI:
Represents the ratio of the circumference of a circle to its diameter, specified by the constant, π.
Trigonometry.Asin:
Returns the angle whose sine is the specified number.
Parameter | Description |
value | A double-precision floating-point value |
Trigonometry.Acos:
Returns the angle whose cosine is the specified number.
Parameter | Description |
value | A double-precision floating-point value |
Trigonometry.Atan:
Returns the angle whose tangent is the specified number.
Parameter | Description |
value | A double-precision floating-point value |
Trigonometry.Atan2:
Returns the angle whose tangent is the quotient of two specified numbers.
Parameter | Description |
y | A double-precision floating-point value |
x | A double-precision floating-point value |
Trigonometry.Sin:
Returns the sine of the specified angle.
Parameter | Description |
angle | A double-precision floating-point value |
Trigonometry.Cos:
Returns the cosine of the specified angle.
Parameter | Description |
angle | A double-precision floating-point value |
Trigonometry.Tan:
Returns the tangent of the specified angle.
Parameter | Description |
angle | A double-precision floating-point value |
Trigonometry.Sinh:
Returns the hyperbolic sine of the specified angle.
Parameter | Description |
angle | A double-precision floating-point value |
Trigonometry.Cosh:
Returns the hyperbolic cosine of the specified angle.
Parameter | Description |
angle | A double-precision floating-point value |
Trigonometry.Tanh:
Returns the hyperbolic tangent of the specified angle.
Parameter | Description |
angle | A double-precision floating-point value |