SharePoint List- Sorting order not showing correctly for calculated column returning Go Live Month & Year

Harry N Nomikos 1,336 Reputation points
2023-06-06T01:50:51.5833333+00:00

Hi Team

I'm having issues with trying to sort my calculated column Go Live Month based on oldest to newest. It seems to be sorting in Alphabetical order as opposed to Month then Year. The current formula I'm using is =TEXT([Go Live Date],"mmm-yyyy")

I've tried using this formula =DATE(YEAR([Go Live Date]),MONTH([Go Live Date]),1) and it's sorting by the correct order, but the value it's returning is the first day of each month, followed by the month, then the year - 01/07/2021

My expected result would be MMM-YYYY and to sort based on month, then year as shown below:

Dec-2020
Jan-2021
Feb-2021
Mar-2021

Any help here would be greatly appreciated.

Regards,
Harry

Microsoft 365 and Office SharePoint Server For business
Microsoft 365 and Office SharePoint For business Windows
0 comments No comments
{count} votes

Accepted answer
  1. Emily Du-MSFT 51,836 Reputation points Microsoft External Staff
    2023-06-07T06:11:19.66+00:00

    Apologies as I rushed writing the above and introduced confusion. Here is a new answer for clarification.

    1.There is no option for the calculated field to show format as 'mmm-yyyy' when it is grouped.

    2.When using TEXT([Go Live Date],"mmm-yyyy") in the calculated column, it always returns text value, so time sorting cannot work well in this calculated column.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Emily Du-MSFT 51,836 Reputation points Microsoft External Staff
    2023-06-06T08:16:31.28+00:00

    1.Create a Data and time column named Go Live Data, then create a calculated column named Go Live Month.

    2.In the Go Live Month calculated column, use =TEXT([Go Live Date],"mmm-yyyy") in the formula, then set "The data type returned from this formula" as Data and time.

    User's image

    Result:

    User's image

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.