PhixFlow Help

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Function: thresholds()

Returns an array of arrays showing how much of an amount exceeds each of the given thresholds.

Syntax

thresholds(amount, listOfThresholds, keyValuesN)

Argument Type Description
amount Integer The amount to be evaluated against each threshold.
listOfThresholds Integer List of thresholds to be evaluated against the amount.
keyValuesN Any An array of key values of any type (Date, Number, String or Array). One for each threshold element.

Examples

thresholds(50, [0,10,22])

Here, an amount of 50 will be evaluated to see how much it crosses thresholds of 0, 10 and 22.

thresholds() returns: [ [0,10], [10,12], [22,28] ]

thresholds(50, [0,10,22], ["A","B","C"])

Here, an amount of 50 will be evaluated to see how much of it crosses thresholds of 0, 10 and 22, with a key value of "A" associated to threshold 0, "B" to threshold 10 and "C" to threshold 22.

thresholds() returns: [ [0,"A",10], [10,"B",12], [22,"C",28] ]

thresholds(15, [10,20])

Here, an amount of 15 will be evaluated to see how much it crosses thresholds of 10 and 20.

thresholds() returns: [ [10,5] ]

thresholds(15, [20,30])

Here, an amount of 15 will be evaluated to see how much it crosses thresholds of 20 and 30.

thresholds() returns: _NULL as the amount does not cross either threshold.

See Also

  • No labels