Row Total ​
Add a total row using ALL in the ROWS clause.
Interactive Example ​
Try It
TABLE WHERE occupation IS NOT NULL ROWS (occupation | ALL) COLS education * gender * income.sum ;
Dataset:
samplesoccupation, education, gender, incomeTry Variations
Query Breakdown ​
(occupation | ALL)- Shows each occupation value plus a total row at the bottomCOLS education * gender * income.sum- Nested column headers without totals
The parentheses group the dimension with its total. The | operator concatenates the individual values with the ALL aggregate row.
Related Examples ​
- Column Total - Add totals to columns instead of rows
- Full Marginals - Both row and column totals
- Subtotals - Totals at inner nesting levels