sumif()

The sumif() function returns the summed total for a value on all instances of a specified template. The instances must be descendants (e.g., children, grandchildren, etc.) or an association of the current work item to be included in the aggregation.

Syntax

sumif(template API name, value, condition)

Argument Description
template API name / association name

(required)

The template API name OR an association of the template instances containing the value to be summed.
value

(required)

The value to be summed.

The value arguments can be constants (i.e., hard-coded values or attribute references) and/or references to metrics. The value argument can also be a mathematical equation.

condition

(optional)

The filter that determines which values to be included in the sum total.

Notes

  • The filter can include “and” and “or” to further clarify the result set to include.
  • The “active=true” or “active=false” filter can be used to restrict the result set to specifically Active or specifically Inactive work items.  Not including this filter will retrieve all instances.
  • An abbreviation for “active=true” is simply “active”

Where Available

  • Metric expression
  • Attribute expression

Examples

Where Example(s)
Metric expression

 

sumif(Initiative__t, OPEX__m)

sumif(Initiative__t, OPEX__m, active=true and business_unit__c = "West")

sumif(Initiative__t, (OPEX__m + CAPEX__m) * currency_conversion__c, active=true and business_unit__c = "West")

sumif(Initiative__t, OPEX__m, active)

Attribute expression
sumif(Task__t, Hours_Worked__c)

sumif(Task__t, Hours_Worked__c, Priority=”High”)

 

Updated on February 16, 2023

Related Articles