cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Alisea_MI
Resolver I
Resolver I

Sort a dynamic text column (Month Year)

Hi!

I have a dynamic text column containing Month + Year (6 previous moths data).
The column is current being sorted as text by month name.
  
How can I sort it by Year - Month? I have no other date column to sort it by.

 

Many thanks in advance!

 

Capture.JPG

 

 

1 ACCEPTED SOLUTION
ribisht17
Super User
Super User

@Alisea_MI 

 

Step 1

Create a duplicate column

 

Step 2

Replace Mars with Mar, Februari with Feb so on

 

Now you get a date column with Step 2, now sort on this

 

Regards,

Ritesh

View solution in original post

4 REPLIES 4
ribisht17
Super User
Super User

@Alisea_MI 

 

Step 1

Create a duplicate column

 

Step 2

Replace Mars with Mar, Februari with Feb so on

 

Now you get a date column with Step 2, now sort on this

 

Regards,

Ritesh

Arul
Super User
Super User

@Alisea_MI ,

try to create one calculated column using beolw dax,

Monthyear sort = FORMAT(financials[Date],"YYYYMM")

and then sort the above column by using sortby column option.

Thanks,

Arul

ribisht17
Super User
Super User

@Alisea_MI 

 

An elegant solution is to create a date bin. You do this by

 

  1. Right click on data field (make sure it's a date type)
  2. Select 'New Group'
  3. Create Bins (could be more than one month if you wish)
  4. choose the new bin for your 'shared axis' in the Report View
  5. win

ribisht17_0-1652862741857.png

>>>> how to sort Date (MonthYear column)? - Microsoft Power BI Community

 

Regards,

Ritesh

Hi, @ribisht17 ! Thanks for you idea! Unfortunately I could change it to a date - the months are in Swedish and it didn't work.

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

Power BI Dev Camp Session 25 with aka link 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, August 25 at 11a PDT for a great session with Ted Pattison!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors