CountRows
Iterator
CountRows(table)
COUNT(*) over the named table at the query’s join grain, inside the active filter context. Additive (composes under to-date accumulation). Where a one-to-many join would double-count, the engine fails loud rather than inflating the number.
When to use it
Section titled “When to use it”- Plain how many rows — order lines, events, tickets — as opposed to
Count(col)(non-blank values of one column). - Activity volume that should accumulate:
YTD(CountRows(Sales), …)works because row counts are additive.
Example
Section titled “Example”OrderLines := CountRows(Sales)