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
karkar
Helper III
Helper III

date Sorting

 

 

 

Hello,

 

I created the following columns and was confused with the sorting of the Month/Year .

I still keep ketting February prior to January. Any thoughts

1 ACCEPTED SOLUTION

Thansk Again Phil.

 

I will remove Weeks and then only use Month/Year and DD fields.

 

I went to the modeling tab and sorted the data by M/Y Sort. It did the trick. Thanks again

View solution in original post

5 REPLIES 5
Phil_Seamark
Employee
Employee

Do you have a separate DATE table with 1 row per day?

 

If not, I recommend you do for more reasons than this.  It will make sorting and hierarchies tidier.

 

So at the very least add the following table 

 

Dates = CALENDARAUTO()

And then create a relationship between this table and your Query table


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Thanks Phil. I will make sure I have a date table connected . But it is strange that it worked the other day using those formulaes.

There wasnt any problem with February going prior to January!!!!

 

 

Regards

Another thing I notice is that your hierarchy has Month then Week.

 

Weeks don't always play nicely with Months given they don't share clean boundaries.  This can often cause issues depending on how the weeks are linked to the months.

 

Note here how the 5th week in June 2016 also includes some dates from July.  There is a small chance this can be upsetting your sorting.

 

weeks.png


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Thansk Again Phil.

 

I will remove Weeks and then only use Month/Year and DD fields.

 

I went to the modeling tab and sorted the data by M/Y Sort. It did the trick. Thanks again

Cool, Nice work


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

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.