On this Page
Docs Menu

Go to Field Parameter List


The value_format_name parameter enables you to format Looker cells using built-in or custom format names. For example:

- measure: total_order_amount type: sum sql: ${order_amount} value_format_name: usd

The default format names are:

Name Example
id 1234
decimal_0 1,234
decimal_1 1,234.5
decimal_2 1,234.56
decimal_3 1,234.567
decimal_4 1,234.5678
Name Example
usd_0 $1,234
usd $1,234.56
gbp_0 £1,234
gbp £1,234.56
eur_0 €1,234
eur €1,234.56

The default format names for percentages are:

For percentage formats, Looker takes the underlying decimal value and multiplies it by 100 to get a percentage. The examples below start with the underlying value “0.123456”:

Name Example
percent_0 12%
percent_1 12.3%
percent_2 12.34%
percent_3 12.345%
percent_4 12.3456%

Note that when using one of the default format names, Looker rounds up or down to remove digits, rather than truncating values.

You can also create your own named formats by using the value_formats parameter.

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