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