countIf

Use the countIf function to count the number of items in a collection that match a given value.

Function format

countIf(Input Collection, Value)

  • Input Collection: The collection whose items are compared against the value.

  • Value: The value that collection items are matched against.

countIf example

In an Expenses Repeating section, use countIf to count how many rows have "Travel" as their category.

countIf(["Travel", "Meals", "Travel", "Supplies"], "Travel")

The formula returns the Integer 2, the number of Expenses rows with "Travel" as their category.