사용
view: view_name {
measure: field_name {
direction: "row"
}
}
|
계층 구조
direction |
가능한 필드 유형
측정
수락
row 또는 column
|
정의
type: percent_of_total 또는 type: running_total 측정값이 피벗과 함께 사용되는 경우 direction를 사용하여 계산 방향을 제어할 수 있습니다.
피벗된 경우 이러한 계산의 기본 방향은 행 전체입니다. 사용자가 열을 따라 계산을 수행하는 것을 선호하는 경우도 있습니다. 이 경우 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)
}