On this Page
Docs Menu

Go to Field Parameter List


If you are using Redshift or BigQuery Legacy SQL, the approximate parameter enables you to use approximate counting with type: count and type: count_distinct measures. With large datasets, approximate counts can be much faster than exact counts, and are typically within a few percent of the actual value. Please check your SQL dialect’s documentation to understand the speed and accuracy tradeoffs of this method.

- measure: apx_unique_count type: count_distinct approximate: true # default value is false sql: ${id}

Turning on approximate with a type: count measure may seem unnecessary, because the approximate counting feature only applies to distinct counts. However, there are some situations when Looker automatically turns type: count measures into a distinct count of a primary key, to provide accurate results for joined views. In those situations approximate counting may be useful.

Still have questions?
Go to Discourse - or - Email Support