Forum Discussion
MichaelDano
Mar 15, 2023Brass Contributor
Sharepoint list does not group correctly on a calculated field
I have a Sharepoint list with a field "Day", where users enter a date. I have a calculated field, "Week", that finds the week number of "Day". When I group by "Week", the list only shows the first ...
SvenSieverding
Mar 16, 2023Bronze Contributor
Hi MichaelDano
grouping by a calculated field works in general... See here
Could you share the formula you used in the calculated field?
Did you group the view using the arrow down next to the column header or did you edit the view in classical mode using "Edit current view" and then scrolling down to "Group By"?
Best Regards,
Sven
MichaelDano
Mar 16, 2023Brass Contributor
Hi SvenSieverding
The week number formular (with ";" and not "," which work for my location in DK):
=CONCATENATE(TEXT(IF(INT((Day-DATE(YEAR(Day);1;1)+(TEXT(WEEKDAY(DATE(YEAR(Day);1;1)-1);"d")))/7)=0;52;INT((Day-DATE(YEAR(Day);1;1)+(TEXT(WEEKDAY(DATE(YEAR(Day);1;1)-1);"d")))/7));"0"))
I'm using modern Sharepoint and edited the view, scrolled down to grouping and set "Week" as group by..
I've now tried the group by function next to the column header, and that didn't work either ...
I'm not sure why I have to use ";" instead of "," in my formulas, but guess it must have something to do with local settings?
The week number formular (with ";" and not "," which work for my location in DK):
=CONCATENATE(TEXT(IF(INT((Day-DATE(YEAR(Day);1;1)+(TEXT(WEEKDAY(DATE(YEAR(Day);1;1)-1);"d")))/7)=0;52;INT((Day-DATE(YEAR(Day);1;1)+(TEXT(WEEKDAY(DATE(YEAR(Day);1;1)-1);"d")))/7));"0"))
I'm using modern Sharepoint and edited the view, scrolled down to grouping and set "Week" as group by..
I've now tried the group by function next to the column header, and that didn't work either ...
I'm not sure why I have to use ";" instead of "," in my formulas, but guess it must have something to do with local settings?