Skip to main content

Examples

Compare vs Franchisees

Compare vs Full Network

Compare vs Region Average

Attributes

name
string
required
Display name shown in the dropdown (e.g., “vs Franchisees”)
agg
string
required
Aggregation function to apply across benchmark entities. Options: avg, median, min, max, sum, count, count_distinctAllowed values:
  • avg
  • median
  • min
  • max
  • sum
  • count
  • count_distinct
subject
string
required
Column that defines individual entities (e.g., “store_id”, “customer_id”). Required for benchmark calculations.
value
string
Optional column or expression to use for benchmark calculation. If not specified, uses the main value column. Useful if you have a pre-aggregated benchmark table for RLS reasons.
where
string
SQL WHERE clause to filter which entities are included in the benchmark (e.g., “ownership_type = ‘franchise’”)
within
array
Dimension columns to group the benchmark by (e.g., [“region”]). Leave empty for dataset-wide benchmark.
exclude_self
boolean
default:"false"
Exclude the current row from its own benchmark calculation (table context only). Default: false
display_type
string
Default display type for this comparison. Options: pct (percentage change), abs (absolute change), compared_value (benchmark value)Allowed values:
  • pct
  • abs
  • compared_value
text
string
Custom comparison label text (overrides default “vs ”)
pct_fmt
string
Format code for percentage values. See Value Formatting for available formats.
abs_fmt
string
Format code for absolute values. See Value Formatting for available formats.
down_is_good
boolean
default:"false"
If true, negative changes are shown as positive (green)

Allowed Parents