Skip to content

Aggregate Labels ​

Labels on aggregates clarify what each column shows.

Interactive Example ​

Try It
TABLE
  ROWS occupation * gender
  COLS education * (income.sum 'Total Income' | income.mean 'Avg Income')
;
Dataset:samplesoccupation, education, gender, income
Try Variations

Query Breakdown ​

  • income.sum 'Total Income' - Labels the sum aggregate as "Total Income"
  • income.mean 'Avg Income' - Labels the mean aggregate as "Avg Income"
  • Labels appear in column headers instead of default names like "income_sum"

Aggregate labels make tables more readable by replacing technical field names with user-friendly descriptions.

Powered by Malloy and DuckDB