Forum Discussion
pmdci
Advocate V
10 years agomatrix table: sort columns in descending order
Hi, I have created a matrix table to show the sales figures for my sales reps (rows), by week number (columns). Problem is that the week numbers are being displayed in ascending order (1 to 5...
Anonymous
9 years agoNot applicable
Hi,
You cannot achieve this reverse sorting directly... here is a workaround:
1. Go to the Edit Query option of the Week dim table.
2. Apply Sort desc on the unique week code column (there must be a unique identifier for each week i.e. in my case I have WeekCode column as 20170101, 20170102, 20170103, 20170104, 20170205, 20170206.... YYYYMMWW where WW is the incremental week number of the year from 1 to 52.
3. Select 'Add Index column' from Add Column menu and provide Starting Index=1 and Increment=1 in the dialog box.
4. Rename column as appropriate.
4. Save Apply and Close the Edit Query
5. Use this Index as 'Sort By Column' wherever required.
Anonymous
7 years agoNot applicable
This wont work in Direct Query mode. Is there another option