Usage
view: view_name { measure: field_name { precision: 10 } }
Hierarchy
precision |
Possible Field Types
Measure
Default Value
6
Accepts
An integer
|
Definition
In Explores where fanout joins could cause incorrect results for aggregate functions, Looker applies symmetric aggregate logic to return correct calculations.
For aggregate fields where symmetric aggregate logic is applied, by default Looker returns six digits after the decimal point. Use the precision
field to change the number of digits after the decimal point:
Set the value of
precision
to7
or higher if you need more digits after the decimal point for your calculations.Set the value of
precision
to5
or lower when working with very large numbers, to avoid overflowing the decimal limit on your database.
For more information about symmetric aggregates, see the Understanding symmetric aggregates Best Practices page.
Examples
This example creates a field called average_value
by averaging the value
dimension, and maintaining a precision of 10 digits following the decimal point:
measure: average_value {
type: average
precision: 10
sql: ${value} ;;
}