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
Alisea_MI
Advocate III
Advocate III

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





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

Proud to be a Super User!


LinkedIn


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