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