Skip to content

Cell Percentage ​

ACROSS with no scope calculates each cell as a percentage of the grand total.

Interactive Example ​

Try It
TABLE
  WHERE occupation IS NOT NULL
  ROWS occupation * gender
  COLS education * (income.sum ACROSS)
;
Dataset:samplesoccupation, education, gender, income
Try Variations

Query Breakdown ​

  • ROWS occupation * gender - Creates row hierarchy with occupation and gender
  • COLS education - Education levels as columns
  • (income.sum ACROSS) - Each cell shows its percentage of the grand total across all rows and columns

When ACROSS has no scope specified, percentages are calculated against the entire table. All cells together sum to 100%.

Powered by Malloy and DuckDB