Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 940 Bytes

File metadata and controls

48 lines (37 loc) · 940 Bytes
description
Guidelines for different types of fields, their naming, attributes, and style

Fields

Order of parameters

  • 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

One field as both Dimension and Measure

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} ;;
}