home User Guide Getting Started Help Center Documentation Community Training Certification
menu
close
settings
Looker keyboard_arrow_down
language keyboard_arrow_down
English
Français
Deutsch
日本語
search
print
Looker documentation will be moving to cloud.google.com in mid-2022!
All the information you rely on will be migrated and all docs.looker.com URLs will be redirected to the appropriate page.
direction

Usage

view: view_name {
  measure: field_name {
    direction: "row"
  }
}
Hierarchy
direction
Possible Field Types
Measure

Accepts
Either row or column

Definition

If a measure of type: percent_of_total or type: running_total is used with a pivot, you can control the direction of the calculation using direction.

When pivoted, the default direction for these calculations is across the row. Sometimes users prefer the calculation to be performed down the column. This can be done by using direction: "column".

measure: running_order_total { type: running_total sql: ${order_total} ;; direction: "row" # Calculation across the row (default) } measure: running_order_total { type: running_total sql: ${order_total} ;; direction: "column" # Calculation down the column (row is default) }

Top