SUMLISTIF

The SUMLISTIF function calculates the sum of values from a list that meet a specified condition. It iterates through the list, checks each item against the given condition, and sums only the values that satisfy it.

Syntax:

SUMLISTIF (List that must be added, Condition that must be met)

Parameters:

List that must be added: List you want to sum the elements
Condition that must be met:  Logical expression that will be checked to add the element to the list or not

Usage examples:

Sum all rollerdoor widths that are bigger than 3m:

SUMLISTIF (shedresult.rollerdoors*.width, shedresult.rollerdoors.width > 3000)

Count how many rollerdoors without motors/auto shutters

COUNTLISTIF(shedresult.rollerdoors.*.hasmotor=false)

Count how many roller gates on the list don't have a motor:

COUNTLISTIF(shedresult.rollerdoors.*.hasmotor<>true)

Count how many rollerdoors have chains or have motors in the front wall:

COUNTLISTIF( AND ( OR (shedresult.rollerdoors.*.hasmotor, shedresult.rollerdoors.*.haschain), shedresult.rollerdoors.*.wallidentifier="Front"))

Last updated