MIN¶
Description¶
MIN goes over all the values you provide in a set of brackets, each separated by a comma, and returns the lowest
value.
It can also return the lowest value from a single list produced by another function.
Example: Multiple values¶
This expression will always return the value that is lower, whether that is the actual or the expected amount of assets under management for the entity.
Example: From single list of properties¶
MIN can also return the lowest value of a list of values produced by another function.
For example:
This expression works in a couple of steps to bring you the result:
MIN(...)is the overarching function, of which you want the result. In between its brackets sits another function.get_properties_from_instances(...)is the function inside theMINbrackets, which goes and fetches the property of the instances you specify. For more information see also get_properties.instances(AccountHolder, personal_income)returns the personal income of all the accountholders.- These three combined, give you the single lowest value out of the personal incomes for all the accountholders in the case.
Empty and unknown values¶
An extra argument next to the list is not a fallback, it takes part in the calculation like any other value, so
MIN([5], 0) returns 0 rather than 5.
MIN returns unknown when the list is empty, and when any value in the list is unknown.
The expression around it becomes unknown rather than failing, and a rule that needs the result asks for the missing
value.
Use MIN_OF_ANY to skip the unknown values instead, which returns 0 when
nothing at all is known.