Forum Discussion
Sorting the Slicer
- 10 years ago
sanoraya - To order your months by a number range I go to the data tab in Power BI desktop:
In the ribbon you will see the Sort By Column button. Select the column you are interested in first (in my picture it would be Months), then click the Sort By Columns button.
Now you need to have a column which lists the months in the numeric order you want. For example, January will always show up as 1. In the sort by column button you will then need to click the appropriate column containing the month numbers.
This will then sort your slicer the way you want.
Thanks,
Giles
sanoraya - To order your months by a number range I go to the data tab in Power BI desktop:
In the ribbon you will see the Sort By Column button. Select the column you are interested in first (in my picture it would be Months), then click the Sort By Columns button.
Now you need to have a column which lists the months in the numeric order you want. For example, January will always show up as 1. In the sort by column button you will then need to click the appropriate column containing the month numbers.
This will then sort your slicer the way you want.
Thanks,
Giles
- Dag8 years agoAdvocate II
I cannot see this working.
My report seems completely agnostic to sort order in the tables view. The control only gives me option of sorting in the order of the field itself :-(
EDIT: Hey Presto! I got it to work. It is crucial to understand that sort order is specified separately on each column, and not on the table as a whole. In the typical scenario, where one wants the slicer sorted according to values in another column, the relevant sort order must be specified on the column holding the display values of the slicer.
- Tas19 years agoAdvocate I
Hi, I did that but didn't work for me :(
I have a weekdays slicer and tried the same..I created a column of week days numbers and sorted by it ....it did sort the table but nothing changed on the report page the slicer is sorted alphabetically
Help Please !!!!!
- Werafa9 years agoRegular Visitor
Me too.
want calendar sorted by fin year.
Slicer is randomly sorted, and does not respond to sorting the source data table
- jb1t9 years agoAdvocate I
Is there a way to sort in descending order? I have 3 columns and ID, Name, and Count. I want to sort by the largest count first.
- Salenew4 years agoRegular Visitor
Ah, so you select the column that you want to show on your slicer (e.g. Month name), then you click on 'Sort By Column' and sort by the month number column.
Thank you!
- DTaraboletti2 years agoHelper I
GilesWalker - Thanks for the above referenced solution... I'm able to make that work for a single data field slicer, but do you (or anyone) have recommendations for a two-field slicer?
I have the following underlying datatable (used for page navigation). NOTE: I'm using the Table (Rather than Button Bookmark/Page Navigator to make this more dynamic and because I'm using the slicer selection to display page description and other information in a separate dialog box)
And that table is used for the following slicer
As noted above, I am using Section (Long Name) and Page as the slicer options. For this arrangement, I get the following error message when trying to "Sort by Column" with Page selected and the sort order option of "Sort Order" column.
Having received that error, I tried to do the "Sort By Column" option on "Tab Name" column. The "Sort By Column" function works (no error) but when I adjust the Slicer as follows..
The Slicer sort sequence is not updated and remains as shown below
I would prefer not to have to create 2 separate slicers (one for section and a dependent one for Page)... so I'm seeking advice from this community.