How to group by date chronologically for library views

This post describes how to group by date chronologically for library based views.

(this post was written using a SharePoint 2010 environment)

So here’s the scenario, we have a document library that contains agendas, minutes, reports and other files related to meetings. The document library has a custom column called ‘Meeting Date’, a date column that is mandatory for all files that are uploaded.

We are required to create a view that is grouped by meeting date, sorted chronologically. Let’s give it a go!

Step one – prerequisites

My setup to achieve this was as follows:

  • A document library
  • An additional date column ‘Meeting Date’

Step two – configure the library

  • Navigate to the document library
  • Create a new calculated column called ‘Month of Meeting’
  • In the Formula section, add the following:
=IF([Meeting Date]="","Empty",("0"&MONTH([Meeting Date])&"/"&RIGHT(YEAR([Meeting Date]),4)))

NOTE
This formula basically states that if Meeting Date is blank, show Empty, if the meeting date has a value format it as MONTH (0 in front of the month number) / YEAR (yyyy).

  • Make sure the data type returned is ‘single line of text’
  • Press OK

Test your changes!

Now we have created a calculated column, we can test our changes by adding the column to a view and checking the Month of Meeting column has values.

Step two – create the view

Now we have verified our formula is working, we can start building out our view based on the requirements.

  • Navigate to the document library
  • Under Library Tools > Library > Create View
  • Scroll down to Group By, then group by Month of Meeting in ascending order
  • Press OK

NOTE
In the Group By section, you can set whether the groups are open or closed by default by choosing either collapsed (closed), or expanded (open).

You can also change the default number of groups to display from 30, but beware of slower page loading if you set it too high.

Now our view is configured we can take a look at it in all its chronological glory!

If you want to find out more about using group views, take a look at another post I wrote on ways around the 10 item limit in choice columns.

Leave a Reply

Recent posts

Discover more from SharePoint Stuff

Subscribe now to keep reading and get access to the full archive.

Continue reading