description |
---|
Guidelines for different types of fields, their naming, attributes, and style |
- hidden: yes|no
- UI-related descriptive parameters
- label
- group_label
- group_item_label
- description
- type
- type-related parameters
- timeframes
- intervals
- tiers
- sql
- sql-related parameters
- sql_distinct___key
- sql_start
- sql_end
- sql_latitude
- sql_longitude
- value_format___name | value_format
Measure is an aggregation, whereas Dimension is categorical data. Sometimes, we need the same column, especially if it has numerical value, to be available as both types.
In this case you can create a dimension and use it in the measure using the naming convention
dimension: revenue {
type: number
sql: ${TABLE}.revenue ;;
}
measure: total_revenue {
type:sum
sql: ${revenue_dim} ;;
}