I have a Matrix visual in Microsoft PowerBI with Australian 'States' as rows and 'Months Ago' as columns.
By default the Matrix shows my columns from 0 months ago to 12. I would like it to show from 12 months ago on the left to 0 months ago on the right.
+-------------------+-----------------------------+-------+
| | Months Ago | |
+-------------------+-----------------------------+-------+
| State | 0 | 1 | 2 | 3 | 4 | 5 | Total |
+-------------------+----+----+----+----+----+----+-------+
| Queensland | 10 | 10 | 10 | 10 | 10 | 10 | 60 |
+-------------------+----+----+----+----+----+----+-------+
| New South Wales | | | | | | | |
+-------------------+----+----+----+----+----+----+-------+
| Victoria | | | | | | | |
+-------------------+----+----+----+----+----+----+-------+
| South Australia | | | | | | | |
+-------------------+----+----+----+----+----+----+-------+
| Western Australia | | | | | | | |
+-------------------+----+----+----+----+----+----+-------+
Currently I am only given the option to sort by the value type fields (ie revenue etc).
Is there any option to sort/order the Column Headers?
Press Shift + Left Click on the Header Column on which you wish to apply Multiple Sort. Here, we will select the Order Date Column with Shift + Left Click. You can see here, first, it sorts the data based on the Item and then it sorted data based on “Order Date” column.
Click on the Data tab, highlight the row, select the Modeling tab, then "Sort By Column". This will allow you to sort by a different column, such as Account Number.
You can sort multiple columns in a table just by holding the shif key and clicking the column headers you want to sort.
I don't think there is an option for you to sort column headers directly.
However, you can change the default sort order for the Months Ago
column so that it will be reflected in general.
You can add a custom column MonthSrt
= 12 - [Months Ago]
in query editor:
(It won't work in DAX because of a known issue)
Then you can select the Months Ago
column and sort it by MonthSrt
:
The custom sort will be applied when you use the Months Ago
column in visuals:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With