cancel
Showing results for
Did you mean:
Helper I

## 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

1 ACCEPTED SOLUTION
Solution Sage

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

6 REPLIES 6
Solution Sage

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

Helper I

Hi Tried that too - but does not work too

Solution Sage

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

Solution Sage

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.

Helper I

Hi tried that and it did not work

Solution Sage

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.

Oryginally you have wrong order on your visual like this:

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:

Announcements

#### Join Arun Ulag at MPPC23

Get a sneak peek into this year's Power Platform Conference Keynote.

#### Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

#### Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

#### Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors
Top Kudoed Authors