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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Alisea_MI
Resolver II
Resolver II

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors