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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply

Date Month Sort - In DIMDATE Table

Hi Experts

 

How would you sort the a DD MMM column in a DimDate table (see column image i need to sort) in day month order

 

parminderkellah_0-1673625643510.png

 

1 ACCEPTED SOLUTION
Padycosmos
Solution Sage
Solution Sage

Add a column for MonthNumber and sort the DayMonth column by MonthNumber

Padycosmos_0-1673626616474.png

 

View solution in original post

6 REPLIES 6
Padycosmos
Solution Sage
Solution Sage

Add a column for MonthNumber and sort the DayMonth column by MonthNumber

Padycosmos_0-1673626616474.png

 

Hi Tried that too - but does not work too

Padycosmos_0-1673626806869.png

Did you select the DayMonth coumn and Sort by Month Number column?,

We are sorting one column based on the values of another column, It works for me

bolfri
Super User
Super User

You need to have additional column (eg. oryginal_date) with standard date type format eg 2022-01-13 and then you can select your DayMonth column and select Order by oryginal_date. Note that it won't work correctly if you will have 2 same dates eg 11 May = 11 May 2022 || 11 May 2023 would have different order value.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi tried that and it did not work

Let's assume you have such column as a text:

 

DayMonth

08 Jan
09 Jan
10 Jan
11 Jan
12 Jan
05 Mar
06 Mar
07 Mar
08 Mar

 

In Power Query M add custom column that is duplicate of your existing column, but formatted as a date.

 

bolfri_1-1673626692594.png

Oryginally you have wrong order on your visual like this:

bolfri_2-1673626747217.png

 

But if you will do like I said so select DayMonth column and with Column tools set "Sort by column" as DayMonth - as date you will get something like this:

 

bolfri_3-1673626820957.png

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors