0

I have a year column in one of the SharePoint list.

I want to create a view to filter the items by current year.

How to do this?

I have tried a lot but it doesnt work.

Please help

1 Answer 1

2

You can use calculated columns to achieve that:

  1. Have a year column called "Year".

  2. Create a calculated column called "startOfYear" with the following formula to get the first day of this "Year":

    =DATE([Year],1,1)

    enter image description here

  3. Create a calculated column called "endOfYear" with the following formula the get the last day of this "Year":

    =DATE([Year],12,31)

    enter image description here

  4. You will get:

    enter image description here

  5. Create a view and configure the filter to only display items which the "Year" is current year.

    enter image description here

Update:

For displaying items that the year is not equal to current year:

enter image description here

7
  • Can i use excel formulas like YEAR(TODAY()) in view filter? Mar 4, 2019 at 2:21
  • I created a calculated column base on this TEXT(TODAY(), "yyyy"), it successfully returned the current year 2019. But when i used this as a filter condition on my views, it doesnt work.. can you plss explain Mar 4, 2019 at 2:31
  • Also i want to filter those items that the year is not equal to current year, how to do that Mar 4, 2019 at 3:08
  • 1
    No, we cannot use YEAR(TODAY()). We cannot filter items when Column is equal to another column, for example column "Year" is equal to the calculated column (=TEXT(TODAY(), "yyyy")), it does not support. It only supports [Today] or [Me] as the column value. For displaying items that the year is not equal to current year, check the update. Mar 4, 2019 at 4:43
  • 1
    check the updated answer Mar 4, 2019 at 6:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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