Forum Discussion
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!
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
4 Replies
- ribisht17
Super User
An elegant solution is to create a date bin. You do this by
- Right click on data field (make sure it's a date type)
- Select 'New Group'
- Create Bins (could be more than one month if you wish)
- choose the new bin for your 'shared axis' in the Report View
- win
>>>> how to sort Date (MonthYear column)? - Microsoft Power BI Community
Regards,
Ritesh
- Arul
Super User
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
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