Skip to main content

Fields - Dimension


Dimension is used to gather value from cell or compute value based on single row of data.

Dimension is a table column on which you can’t use SQL aggregate functions like SUM or AVG. Almost all non-numeric data can be considered as a dimension. For example, color, department, country, city, name - they all are dimensions.

Dimensions can reference other dimensions.

fields:   #begin of fields section (inside View or Model)
- dimension: dimension_name
hidden: false
label: 'field label in UI'
description: 'description in UI'
type: dimension_type
result: dimension_result
sql: 'SQL expression'
unnest: 'BigQuery UNNEST SQL expression'
format_number: '$,.0f'
currency_prefix: $
currency_suffix: ''

Dimension Parameters

dimension*string-Field name
labelstring-Override field name in UI
hiddenbooleanfalseHide field in UI
descriptionstring-Field description in UI
typeenum-Dimension type:
  • custom - choose your own transformations in sql parameter (default if no dimension type specified)
  • yesno_is_true - returns Yes if SQL expression evaluates to TRUE, otherwise returns No (this type sets result parameter to yesno implicitly)
resultenum"number"Resulting data type (after SQL transformations):
  • string - use for strings (default for custom dimension type)
  • number - use for numbers or integers
sql*string-Way to calculate field through SQL expression (can use BlockML reference to other dimensions)
unneststring-(BigQuery) for example "JOIN UNNEST(payload.pages) AS page"
format_numberstring-Format Number
currency_prefixstring-Format Number - Symbol
currency_suffixstring-Format Number - Symbol