Filter Calendar View Update

The most popular post on my blog since its inception has been Filter Calendar View. In reviewing the post today I noticed that I had the filter wrong! Please accept my apologies, the updated filter and post is below:

(Updated: 3/23/2011: filter was wrong, is now correct)

Background:
So I am working on my pilot of the company intranet, and I created a corporate holidays calendar. I wanted to display on the home page only the title and date of the events that were upcoming within the next 60 days. I tried to filter by Start Date, but it doesnt display as a filterable column. I searched and found an old post with some syntax and tried it out and it worked.

How To:
If there is a calendar, and you want to create a view where only events from today up to the next 60 days (or how many days out), here is how you do it:

Add a column to your calendar. Name it “Date” and make it a calculated field. Add “Start time” to the formula, and select “add date only”. What this does is it creates a column that is filterable, because Start Date is not, and automatically populates the content of this column with the start date of the event.

Next, create a new view for the calendar, name it “Upcoming” (or whatever). Select whatever fields you would like to display. If you are creating a view to show on another page, like the home page, and you just want a quick list of upcoming events, you might want to just have title and date fields display.

Under “Filter”, select:
Date
is greater than or equal to
[Today]

and

Date
is less than or equal to
[Today]+60

What this does is tells SP to only display events with Date set to today or up to 60 days from now.

Make sure that wherever you want to see this view, you actually select this view in the View drop list.

(Update) Unless you add the second filter, the query will continue to show old posts. 3/23/2011: I had the filter set wrong, the filter should work correctly now.

Advertisements

3 thoughts on “Filter Calendar View Update

  1. Hi, I’ve got this filter in my Calendar view for SP2007.
    It’s working but, if I have an event that goes for 30days, it displays all events leading up to the [Start Date], then disappears.
    What extra Filter would I need to display an event that concludes on the [End Time]?

    • I created another calculated field called Date End, set its formula to End Date. Then I added two filters to the view: after the Date is less than or equal to [Today], I selected “or” then added Date End is greater than or equal to [Today]AndDate End is less than or equal to [Today]+60. I had a test event that was 30 days long and it kept the event displaying even though the start date existed in the past. Please let me know if this works for you.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s