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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
UditJ
Helper III
Helper III

Sorting Year-month sequentially

Using below formula to calculate year-month:

Year-Month = FORMAT('Reporting.Digital'[Date],"MMM YYYY") and sorting this Year-Month on Month Number and below is the output i am getting:

UditJ_0-1709619827123.png


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 

 
1 ACCEPTED SOLUTION
PijushRoy
Super User
Super User

HI @UditJ 

Please create another column

 

SortOrderYearMonth = 
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




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @UditJ ,

Please create a new calculated column:

Year-Month-Sort = YEAR('Reporting.Digital'[Date])*12+MONTH('Reporting.Digital'[Date])-1

And sort by this column.

Best Regards,
Gao

Community Support Team

 

If 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

PijushRoy
Super User
Super User

HI @UditJ 

Please create another column

 

SortOrderYearMonth = 
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




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.