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

« Previous Version 4 Current »

Function: sumIf()

Returns the sum of a set of numbers based on a series of corresponding true/false conditions.

Syntax

sumIf(numberList, conditionList)

ArgumentTypeDescription
numberListNumber ArrayAn Array containing a list of numeric values
conditionListCondition ListAnĀ Array containing a list of PhixFlow expressions that must evaluate to true or false

Examples

Example 1

sumIf([1,1,1,1], [1,0,1,0])

returns 2.

Example 2

sumIf(in.Total, in.Include)

If this is applied to the 3 records from the in pipe

{
	{Total = 32, Include = 1},
	{Total = 20, Include = 0},
	{Total = 15, Include = 1},
}

returns 47.

See Also

  • No labels