Skip to main content
COUNT_ROWS
Tom Williams avatar
Written by Tom Williams
Updated over a year ago

Function: COUNT_ROWS

Syntax: COUNT_ROWS()

Description: Counts the number of rows (groups) returned by the query. In a report, COUNT_ROWS is always equal to the number of entries displayed in the pagination section, at the bottom of the table.

The COUNT_ROWS aggregator may be used in custom formulas to create relative ratios and ponderate the result of other aggregators such as COUNT or SUM.

Sample usage:

  • With a grouping per month, COUNT_ROWS() returns the number of months for which there are data (= number of actual groups = number of rows returned by the query).

  • With a grouping per month and per state, COUNT_ROWS() returns the number of [month, state] pairs for which there are data.

Did this answer your question?