1

A view I created is supposed to filter by the current year. The formula should compare the current year with a column which only has the year.

I don't know how to always get the current year.

I tried creating a calculated column with this formula "Year([Today])" but sharepoint does not like it.

I tried using this formula "Year(Today)" and the view does not return any items.

How do I compare a column with the current year? I am unable to get the current year.

2

Check this workaround and see if it helps:

SharePoint TODAY field and calculated fields...

I used it once before and it works.

I hope you are aware that calculated columns are calculated when item is updated. So after 31.12. 00:00 your calculated columns will no longer be valid (if items are not updated).

1

You might need two calculated columns. One which is the jan/1/year and the other which is dec/31/year.

=TEXT(Date,"01/01/yyyy")

=TEXT(Date,"12/31/yyyy")

Then in your filter you can have it setup so that the first column is less than today and the second column is greater than today.

There might be a better way but this was my first thought.

  • Well, how exactly do you filter them? In your solution there is still the need of the current year... – Emaborsa May 18 '16 at 14:05
0

I've achieved it using something like this http://sivanesanb.blogspot.ch/2011/11/how-to-use-filters-in-sharepoint-to.html#!/2011/11/how-to-use-filters-in-sharepoint-to.html

Also did another one for the Quarter using the formula =ROUNDDOWN(((INT(MONTH([Created]))-1)/3),0)+1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.