Forum Discussion
Sorting Year-month sequentially
Using below formula to calculate year-month:
Desired Output is - Jan 2022 Feb 2022 March 2022 .... Jan 2023 Feb 2023 March 2023..
Please suggest how can i achieve the above desired output
HI UditJ
Please create another columnSortOrderYearMonth = Year(Table[Date])&Month(Table[Date])Select the Year-Month column and change Sort by to new column
Let me know if that works for you
If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.
Thanks
Pijush
Linkedin
2 Replies
- PijushRoyCommunity Champion
HI UditJ
Please create another columnSortOrderYearMonth = Year(Table[Date])&Month(Table[Date])Select the Year-Month column and change Sort by to new column
Let me know if that works for you
If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.
Thanks
Pijush
Linkedin - AnonymousNot applicable
Hi UditJ ,
Please create a new calculated column:Year-Month-Sort = YEAR('Reporting.Digital'[Date])*12+MONTH('Reporting.Digital'[Date])-1And sort by this column.
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group