Skip to main content
{% benchmark_comparison 
    name="vs Franchisees" 
    agg="avg" 
    subject="store_id"
    where="ownership_type = 'franchise'"
/%}

Examples

Compare vs Full Network

{% benchmark_comparison 
    name="vs Full Network" 
    agg="avg" 
    subject="store_id"
/%}

Compare vs Region Average

{% benchmark_comparison 
    name="vs Region Avg" 
    agg="avg" 
    subject="store_id"
    within=["region"]
/%}

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.
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
abs_fmt
String
Format code for absolute values
down_is_good
Boolean
default:"false"
If true, negative changes are shown as positive (green)

Allowed Parents