FILTER
Returns a filtered list of items from a specified array that match a specified condition.
Syntax
=FILTER(array, expression)
Arguments
Argument | Type | Description |
---|---|---|
array | Array | The array to filter |
expression | Boolean | The expression to evaluate for each item in the flattened array, to determine whether it should be counted or not |
Examples
=FILTER(ARRAY(1, 2, 3), this > 1)
→ [2, 3]
Filters the array to include numbers which are greater than 1.
=FILTER(children, this."Property 1" > 2)
→ [4, 6, 7, 8]
Returns a list of children of the current shapes whose shape data property "Property 1" is greater than 2.
=FILTER(ARRAY(ARRAY(1,2), ARRAY(3,4,5), ARRAY(6,7)), COUNT(this) > 2)
→ [[3, 4, 5], [6, 7]]
Returns a list of arrays which contain more than two elements.
Updated 9 months ago