Usage
measure: field_name {
approximate: yes
}
}
Hierarchyapproximate |
Possible Field TypesMeasureAcceptsA Boolean (yes or no) |
Definition
See the Dialect support for
approximate
section on this page for the list of dialects that supportindexes
.
The approximate
parameter lets you use approximate counting with measures of type: count
and type: count_distinct
. 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.
Turning on approximate
with a measure of type: count
might seem unnecessary, because the approximate counting feature applies only to distinct counts. However, there are some situations when Looker automatically turns measures of type: count
into a distinct count of a primary key to provide accurate results for joined views. In those situations, approximate counting may be useful.
Dialect support for approximate
The ability to use approximate
depends on the database dialect your Looker connection is using. In the latest version of Looker, the following dialects support approximate
: