How often have you wanted to group the data that you have created in a SharePoint List, by Month or Year, but not sure how to get that information without asking the user to capture it for you? The user experience should be simple and not become more and more cumbersome as you want more robust reporting. You can solve this problem easily by using use a Column with a calculated field.
The only criteria needed, to enable you to group by Month or Year, using a calculated column, is that there must be a base column in Date Format to calculate from. In this example, the ‘created’ column is used, which is standard in SharePoint and indicates the date that the item was created.
Create a calculated ‘Month’ Column:
This calculation will auto-populate the Month in the following format, and will group the Months in the correct order:
01(January), 02(February), 03(March), etc.
Create a calculated ‘Year’ Column
Create a column named ‘Year’
Select ‘Calculation’ under ‘Type of Column’Insert the following formula: =””&YEAR([Created])
Select ‘Single Line of Text’ under ‘The data type returned from this formula is:’ options.
The calculation will auto-populate the Year in the following format:
2013, 2014, 2015 etc
If SharePoint generates an error, not accepting the formula, try replacing (;) in the formula with (,). For example, with the above ‘Month’ formula, replace it with the new formula using (,) instead of (;):