Deep Hierarchy ​
Multiple nesting levels with totals at each level using the (dimension | ALL) pattern.
Interactive Example ​
Try It
TABLE WHERE occupation IS NOT NULL ROWS (occupation[-5@income.sum] | ALL) * (gender | ALL) COLS (education | ALL) * income.sum ;
Dataset:
samplesoccupation, education, gender, incomeTry Variations
Query Breakdown ​
occupation[-5@income.sum] | ALL- Top 5 occupations by income, plus a grand total row(gender | ALL)- Gender breakdown with subtotal for each occupation(education | ALL)- Education columns with total columnincome.sum- Sum of income as the measure
The (dimension | ALL) pattern at each level creates a hierarchical structure with totals. The occupation level shows the top 5 plus a grand total. Within each occupation, gender shows Male, Female, plus a subtotal. Columns show each education level plus an overall total.
Related Examples ​
- Subtotals - ALL at inner nesting levels
- Full Marginals - Totals on both rows and columns
- Complex Crosstab - Combining multiple advanced features