Column Limits ​
Limits work on column dimensions too. Use [-N] to show the last N values alphabetically, limiting the columns displayed.
Interactive Example ​
Try It
TABLE ROWS occupation * gender COLS education[-2] * income.sum ;
Dataset:
samplesoccupation, education, gender, incomeTry Variations
Query Breakdown ​
TABLE- Declares a crosstab table statementROWS occupation * gender- Two-level row hierarchy: occupation containing genderCOLS education[-2] * income.sum- Column dimension with limit appliededucation[-2]- Last 2 education levels alphabetically (descending)[-2]- Negative number means reverse alphabetical order, limit to 2
income.sum- Measure: sum of income for each cell
Column limits use the same syntax as row limits. The [-N] syntax limits to the last N values alphabetically, while [N] would give the first N.
Related Examples ​
- Alphabetic Row Limits - Limit rows alphabetically
- Top N by Value - Limit by aggregate value instead of alphabetically
- Nested Limits - Apply limits at multiple hierarchy levels