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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
kap_55
Frequent Visitor

Sort Months by dates in date table

Hi,

 

I have my date table sorted by date and in visual my month are not sorted by by the date but by months alphabetically.
I have marked my table as date table too.

 

My date table:

DateTable.PNG

 

My two visuals.

TablesExample.PNG

I disabled the hidden local date tables and created a hierarchy for above visual.

Does the hierarchy need to be sorted somehow?

 

Thanks for help.

K.

 

EDIT:

 

 

 

Calendar = 
ADDCOLUMNS (
     CALENDAR(DATE(1981;01;01);DATE(2080;12;31));
    "CALENDAR YEAR"; YEAR ( [DATE] );
    "MONTH NAME"; FORMAT ( [DATE]; "MMMM" );
    "MONTH NUMBER"; MONTH ( [DATE] );
    "WEEKDAY"; FORMAT ( [DATE]; "DDDD" );
    "WEEKDAY NUMBER"; WEEKDAY( [DATE];2 );
    "WEEK NUMBER";WEEKNUM( [DATE];21);
    "DAY"; DAY([DATE]);
    "QUARTER"; "Q" & TRUNC ( ( MONTH ( [DATE] ) - 1 ) / 3 ) + 1
)

 

 

EDIT2: File

 

https://drive.google.com/file/d/1AlsVzHyg0qV6WDkfE3-zf26xBT6oTA9z/view?usp=sharing

 

1 ACCEPTED SOLUTION

The sort column did not save correctly. I did it and it is working.

https://www.dropbox.com/s/ikvk0k3juemuqj9/SortMonthQ.pbix?dl=0

 

Screenshot 2020-01-13 17.53.21.png

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Try sorting the month by the month number under the modeling tab.

 

image.png

 

 

 

I tried that before I posted and I does not work for me for some reason. Adding my dax to original post.

Sometimes the visual by default sort it on Value. Have you checked it is sorted on the month column?

 

If possible please share a sample pbix file after removing sensitive information.Thanks.

My Recent Blog -

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

This worked for my date table sorting issue.  It was default sorting by a different value.  So I was able to sort by Month, and now my visual is in chronological order.

 

Thanks!

I added link to my dummy file where I wanted to just create calendar table and I did exactly the steps from my original file and it still doesn't work, so you can check it.

 

The sort column did not save correctly. I did it and it is working.

https://www.dropbox.com/s/ikvk0k3juemuqj9/SortMonthQ.pbix?dl=0

 

Screenshot 2020-01-13 17.53.21.png

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.