cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Akshaya Post Prodigy
Post Prodigy

Sorting of Month Year

I have a column called month year that runs from Jan 2010 - Dec 2020

 

When I create a slicer for it, it sorts as :

Apr 2010

Apr 2011  and so on if it is sorted by month and

Jan 2010

Jan 2011 and so on if sorted by year.

 

I Would like to know how to sort it as folllows:

Jan 2010

Feb 2010

Mar 2010

....

Dec 2010

Jan 2011

Feb 2011

....

 

Is there any way this can be done?

 

Thank You!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
mnayar Solution Specialist
Solution Specialist

Re: Sorting of Month Year

@Akshaya 

 

one solution is calculate a new column (year *100 + month num) and sort your month year column by this new column

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

 

this way april 2010 and april 2011 would show as 201004 and 201104 respectively.

 

 

View solution in original post

3 REPLIES 3
Highlighted
mnayar Solution Specialist
Solution Specialist

Re: Sorting of Month Year

@Akshaya 

 

one solution is calculate a new column (year *100 + month num) and sort your month year column by this new column

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

 

this way april 2010 and april 2011 would show as 201004 and 201104 respectively.

 

 

View solution in original post

Akshaya Post Prodigy
Post Prodigy

Re: Sorting of Month Year

@mnayar It Worked. Thank You!

Kroneborge Helper I
Helper I

Re: Sorting of Month Year

You might also be able to change that month/year column into a date column and then it will sort automatically.  I did that and it still retained the month/year format (save before you try)

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors