I have a list with 2 field, [Date] (Datetime) and [Month] (calculated column = text(date,"YYYY/MM"), I want to group the list by Month, but Sharepoint group it wrongly! How can I fix it?
1 Answer
I am assuming that by current month you do in fact mean the current month of the current year.
Create a column called Month_Digit and hide it from the New/Edit/Disp forms and any applicable views. It should be calculated and of type Number: =MONTH(Created)
Do the same with a field called Year: =YEAR(Created)
In your view sort by Year (descending), then by Month_Digit (descending). Then Group by the text value of Month.
The problem is that =TEXT(Created, "mmmm")
is just a text string and you cannot sort text by anything other than the collation of a given alphabet. So you need to add the numeric representation of the months.
-
I've checked this solution this morning from sharepoint.stackexchange.com/questions/51335/… but my problem is different.– LukeCommented Oct 31, 2017 at 7:40
-
1