Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
tainguyen
Frequent Visitor

Sorting Slicer to Month

Hi guys,

 

I have having difficulties sorting the month in my slicer.

Slicer.png

Above is how it looks on the report.

 

Below is the data, i tried to change the data type to date but i get an error.

 

Dataset.png

 

Please help!!!

 

Thanks,

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Since you already have your month numbers, this will be very easy for you.

 

Select your Month column, then select the Modeling tab at the top ribbon, then use the "Sort by Column" option to select the MonthNo column. This is happening because a text field will sort itself alphabetically by default, but you can instruct that column to sort by the numbers in your MonthNo column.

 

EDIT:

 

Here's a quick demonstration:

 

default sorts the first column alphabeticallydefault sorts the first column alphabetically

"Sort by Column" selection on Rank"Sort by Column" selection on Rank

Now default sort for the first column is by the associated rankNow default sort for the first column is by the associated rank

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Since you already have your month numbers, this will be very easy for you.

 

Select your Month column, then select the Modeling tab at the top ribbon, then use the "Sort by Column" option to select the MonthNo column. This is happening because a text field will sort itself alphabetically by default, but you can instruct that column to sort by the numbers in your MonthNo column.

 

EDIT:

 

Here's a quick demonstration:

 

default sorts the first column alphabeticallydefault sorts the first column alphabetically

"Sort by Column" selection on Rank"Sort by Column" selection on Rank

Now default sort for the first column is by the associated rankNow default sort for the first column is by the associated rank

Thank you for the quick respondse!

 

Ive made the changes and sort the column by MonthNo.

 

I then went back to the report and still unable to sort it to MonthNo.

 

Untitled.png
I believe that the months have moved though....

Anonymous
Not applicable

That's odd. Are you 100% certain that you sorted that column by your "MonthNo" column?

 

I just verified that a slicer will also pick up on the Sort By option selected. Maybe you need to deselect the "Sort by..." option on the visual itself. Also, check to see what happens when you put them on a Table visual next to their MonthNo with nothing sorted.

 

 

Here is the table visual with the month without sorting. 

 

Untitled.png

Smiley Sad

Ive fixed the problem!

 

I didnt set a data type for the MonthNo column. Stupid me

 

Thank you for your help!!

I have set the slicer to sort by month no and i have set the month number to Whole number data type still the sorting does not happen. Can you guys help. TIA Swarna

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.