方向

使用状況

ビュー: 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)
}