Column Total ​
Add a total column using ALL in the COLS clause.
Interactive Example ​
Try It
TABLE ROWS occupation * gender COLS (education | ALL) * income.sum ;
Dataset:
samplesoccupation, education, gender, incomeTry Variations
Query Breakdown ​
ROWS occupation * gender- Nests gender within occupation for row headers(education | ALL)- Shows each education level plus a total column* income.sum- Applies the sum aggregation across all columns
The | operator concatenates the dimension with ALL, creating columns for each education value followed by a grand total column.
Related Examples ​
- Row Total - Add totals to rows instead of columns
- Full Marginals - Both row and column totals
- Total Labels - Custom labels for total cells