FILTER
Last updated
Was this helpful?
Last updated
Was this helpful?
The FILTER formula filters measure values across a period range and returns only those values that satisfy specified conditions. Combine the FILTER function with an aggregation function like SUM/AVG, etc.
measure– The measure to filtered. Required.
periodRange – A period range array returned by the PERIOD_RANGE function. Required.
condition1/condition2- A condition that must evaluate to TRUE or FALSE. Use the THIS keyword to refer to the current value. Required.
Returns a range of measure values that satisfy the specified condition.
In this sales report, we have used the FILTER function with SUM to aggregate only the cells that satisfy a certain condition. We are summing up the sales only when the sales is greater than 1000. The FILTER measure is blank for the "Fasteners" row as none of the cells have sales > 1000. Take a look at the "Envelopes" row. The sales for Q1 and Q4 satisfy the condition that sales should be > 1000; those two cells are returned by the FILTER function and summed up.