Order Ascending by Value ​
Use ASC@aggregate to order all rows in ascending order by a computed value. This shows all occupations ordered by income from lowest to highest.
Interactive Example ​
Try It
TABLE ROWS occupation ASC@income.sum COLS education * income.sum ;
Dataset:
samplesoccupation, education, gender, incomeTry Variations
Query Breakdown ​
TABLE- Declares a crosstab table statementROWS occupation ASC@income.sum- All occupations ordered by income ascendingASC- Ascending order (lowest values first)@income.sum- Order by this aggregate value, not alphabetically- No bracket limit - shows all values
COLS education * income.sum- Column dimension with education breakdownincome.sum- Measure: sum of income for each cell
Use ASC@ for ascending (lowest first) and DESC@ for descending (highest first). Without a bracket limit like [5], all rows are shown in the specified order.
Related Examples ​
- Order by Value (Descending) - Order descending without limit
- Top N by Value - Combine ordering with limits
- Order by Different Aggregate - Sort by one measure, display another