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
manavmehta
Regular Visitor

Not able to sort months chronologically

I am sorting my modified Month column (which is derived from modified date column) chronologically. I have data for April 2018 through February 2019. Although I created a separate column for Sort= FORMAT (Modified Date,"MM YYYY"), but when I am sorting my modified month based on Sort column, it gives me an error that "We can't sort Month column by Sort. There can't be more than one value in sort for the same value in Month." Please help what shall I do in such a scenerio.

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @manavmehta ,

 

Yeah that order alphabetically and since there's more than one value to the same month PBI can't order it.

 

With this said you can create a table with "Enter Data" that would be like:

1January
2February
3March
4April
5May
6June
7July
8August
9September
10October
11November
12December

 

Than you connect the month name in this table to the month name in your Original table, you use the new table field in the visualizations and order by the first column.

 

Let me know if it worked.

 

Best Regards,

DR

View solution in original post

dax
Community Support
Community Support

Hi @manavmehta , 

You could create a column like below , then use this to "sort" Month column  which should work

 

column=year([Modified Date])*100+month([Modified Date])

 

 


Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
dax
Community Support
Community Support

Hi @manavmehta , 

You could create a column like below , then use this to "sort" Month column  which should work

 

column=year([Modified Date])*100+month([Modified Date])

 

 


Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi @manavmehta ,

 

Yeah that order alphabetically and since there's more than one value to the same month PBI can't order it.

 

With this said you can create a table with "Enter Data" that would be like:

1January
2February
3March
4April
5May
6June
7July
8August
9September
10October
11November
12December

 

Than you connect the month name in this table to the month name in your Original table, you use the new table field in the visualizations and order by the first column.

 

Let me know if it worked.

 

Best Regards,

DR

manavmehta
Regular Visitor

Here is the snippet of the dataset.Here is the snippet of the dataset.

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.