<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pentalogic Technology &#187; View</title>
	<atom:link href="http://blog.pentalogic.net/tag/view/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.pentalogic.net</link>
	<description>Company blog and SharePoint Tricks and Tips</description>
	<lastBuildDate>Thu, 09 Sep 2010 14:52:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>How To Use Filters in SharePoint to show items in the current Calendar Month</title>
		<link>http://blog.pentalogic.net/2009/11/howto-filter-items-current-calendar-month-view-sharepoint/</link>
		<comments>http://blog.pentalogic.net/2009/11/howto-filter-items-current-calendar-month-view-sharepoint/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 21:55:53 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Calculated Columns]]></category>
		<category><![CDATA[Filter]]></category>
		<category><![CDATA[SharePoint Ideas]]></category>
		<category><![CDATA[Tip]]></category>
		<category><![CDATA[View]]></category>

		<guid isPermaLink="false">http://blog.pentalogic.net/?p=373</guid>
		<description><![CDATA[
			
				
			
		
Its very easy using the Filter feature of SharePoint views to show only items completed in the last 30 days or items due in the next X days; for example :-
Completed &#62;= [Today]-30
On the Advanced SharePoint View and Filter techniques post Ed asked how you could filter for the current calendar month rather than a [...]


Related posts:<ol><li><a href='http://blog.pentalogic.net/2008/11/the-truth-about-using-today-in-filters/' rel='bookmark' title='Permanent Link: The &#8230; ehem&#8230; Truth about using [Today] in SharePoint Filters'>The &#8230; ehem&#8230; Truth about using [Today] in SharePoint Filters</a> <small>This post looks at the different requirement for using [Today]...</small></li>
<li><a href='http://blog.pentalogic.net/2008/10/advanced-sharepoint-view-and-filters/' rel='bookmark' title='Permanent Link: Advanced SharePoint View and Filter techniques'>Advanced SharePoint View and Filter techniques</a> <small>Advanced SharePoint view and filter techniques focusing on the task...</small></li>
<li><a href='http://blog.pentalogic.net/2010/09/today-sharepoint-calculated-default-values/' rel='bookmark' title='Permanent Link: Using [Today] in SharePoint calculated default values'>Using [Today] in SharePoint calculated default values</a> <small>You can't use Today in SharePoint calculated columns but you...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float:right; margin-top:-100px; clear:both;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.pentalogic.net%2F2009%2F11%2Fhowto-filter-items-current-calendar-month-view-sharepoint%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.pentalogic.net%2F2009%2F11%2Fhowto-filter-items-current-calendar-month-view-sharepoint%2F&amp;source=pentalogic&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Its very easy using the <a href="http://blog.pentalogic.net/2008/11/the-truth-about-using-today-in-filters/">Filter feature of SharePoint views to show only items completed in the last 30 days</a> or items due in the next X days; for example :-</p>
<pre>Completed &gt;= [Today]-30</pre>
<p>On the <a href="http://blog.pentalogic.net/2008/10/advanced-sharepoint-view-and-filters/">Advanced SharePoint View and Filter techniques</a> post Ed asked how you could filter for the current calendar month rather than a rolling 30 day period (for example all tasks due this calendar month).</p>
<p>Like all great questions it seemed simple enough &#8211; something like only showing items where the Month and Year of the due date = the Month and Year of the current date.</p>
<p><span id="more-373"></span></p>
<p>Alas, we <a href="http://blog.pentalogic.net/2008/11/truth-about-using-today-in-calculated-columns/">can&#8217;t use [Today] in calculated columns</a> and we can&#8217;t use functions like Month([Due Date]) in the filter &#8211; so this approach will not work.</p>
<p>The solution is to turn this on its head &#8211; its a bit weird, so bear with me!</p>
<p>We need to have two calculated fields, one showing the first day of the month that the due date is in and one showing the last day of the month that the due date is in.</p>
<p>We can then use the filter to show only records where</p>
<p>[Today] &gt;= First Day Of Month</p>
<p>AND</p>
<p>[Today] &lt;= Last Day Of Month</p>
<p>So looking at this in graphical form we have :-</p>
<div id="attachment_375" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-375 " title="Timeline" src="http://blog.pentalogic.net/wp-content/uploads/2009/11/Timeline.png" alt="Timeline" width="490" height="82" /><p class="wp-caption-text">Timeline</p></div>
<ul>
</ul>
<ul>
<li>In this diagram the current date is 15th Nov (the orange dotted line).</li>
<li>Task 1 &amp; 2 should be shown if the current date [Today] is in between the first and the last day of November (the blue line)</li>
<li>Task 3 will not be shown until [Today] is between the first and the last day of December (the blue line)</li>
</ul>
<table border="0" cellpadding="3">
<tbody>
<tr>
<td><img class="aligncenter size-full wp-image-390" title="create-column" src="http://blog.pentalogic.net/wp-content/uploads/2009/11/create-column1.png" alt="create-column" width="209" height="359" /></td>
<td>
<p>To put this into SharePoint open your list, click Settings &gt; List settings &gt; Create Column and setup the following two columns.</p>
<p><br class="spacer_" /></p>
<ul>
<li>The first column will be called something like Start of Month</li>
<li>Set the column type to Calculated and the data type to Date only </li>
<li>Uncheck the &#8216;Add to default view&#8217; button as we want these columns to stay behind the scenes</li>
</ul>
<ul>
<li>The Start of Month column formula should be</li>
</ul>
<pre>    =DATE(YEAR([Due Date]), MONTH([Due Date]), 1)</pre>
<p><br class="spacer_" /></p>
<ul>
<li>The End of Month formula :-</li>
</ul>
<pre>    =DATE(YEAR([Due Date]), MONTH([Due Date])+1,1)-1

    <em>(Which is the first day of next month - 1)</em></pre>
</td>
</tr>
</tbody>
</table>
<p>View a few records to check the formula is working OK and you see the correct dates.</p>
<table border="0" cellpadding="3">
<tbody>
<tr>
<td><img class="aligncenter size-full wp-image-391" title="View-filter" src="http://blog.pentalogic.net/wp-content/uploads/2009/11/View-filter1.png" alt="View-filter" width="223" height="217" /></td>
<td>
<p>Now create a new view, call it something like &#8220;Due This Month&#8221; and setup the filter for</p>
<pre>Start of Month is less than or equal to [Today]
 AND
End of Month is greater than or equal to [Today]</pre>
</td>
</tr>
</tbody>
</table>
<h4><strong>Further tips</strong></h4>
<p>You can use this with date fields other than [Due Date] &#8211; e.g. [Created] for items created in the current month, [Modified] for items well&#8230; urm&#8230; modified in the current month!</p>
<p>Using the same technique you can also use the following formula</p>
<h4><strong>The current week (Sunday to Saturday inclusive)</strong></h4>
<pre> Start Week =[Due Date] - WEEKDAY([Due Date]) +1
 End Week   =[Due Date] +7 - WEEKDAY([Due Date])
</pre>
<h4><strong>The previous month</strong></h4>
<pre> Start Month =DATE(YEAR([Due Date]), MONTH([Due Date])+1, 1)
 End Month   =DATE(YEAR([Due Date]), MONTH([Due Date])+2,1)-1
</pre>
<h4>The next month</h4>
<pre>
<pre> Start Month =DATE(YEAR([Due Date]), MONTH([Due Date])-1, 1)
 End Month   =DATE(YEAR([Due Date]), MONTH([Due Date]),1)-1</pre>
</pre>
<h4><strong>The current year</strong></h4>
<pre> Start Year =DATE(YEAR([Due Date]),1,1)
 End Year   =DATE(YEAR([Due Date]),12,31)
<strong>
</strong></pre>
<h4><strong>Edit</strong></h4>
<p>I should make clear that this technique will not work correctly on Event lists with recurring event as SharePoint only records the start time of the first event, not each occurrence in the series.</p>
<h4><strong>References</strong></h4>
<ul>
<li><a rel="nofollow" href="http://office.microsoft.com/en-us/sharepointtechnology/CH101032601033.aspx" target="_blank">Date and time functions</a></li>
</ul>


<p>Related posts:<ol><li><a href='http://blog.pentalogic.net/2008/11/the-truth-about-using-today-in-filters/' rel='bookmark' title='Permanent Link: The &#8230; ehem&#8230; Truth about using [Today] in SharePoint Filters'>The &#8230; ehem&#8230; Truth about using [Today] in SharePoint Filters</a> <small>This post looks at the different requirement for using [Today]...</small></li>
<li><a href='http://blog.pentalogic.net/2008/10/advanced-sharepoint-view-and-filters/' rel='bookmark' title='Permanent Link: Advanced SharePoint View and Filter techniques'>Advanced SharePoint View and Filter techniques</a> <small>Advanced SharePoint view and filter techniques focusing on the task...</small></li>
<li><a href='http://blog.pentalogic.net/2010/09/today-sharepoint-calculated-default-values/' rel='bookmark' title='Permanent Link: Using [Today] in SharePoint calculated default values'>Using [Today] in SharePoint calculated default values</a> <small>You can't use Today in SharePoint calculated columns but you...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.pentalogic.net/2009/11/howto-filter-items-current-calendar-month-view-sharepoint/feed/</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
		<item>
		<title>Advanced SharePoint View and Filter techniques</title>
		<link>http://blog.pentalogic.net/2008/10/advanced-sharepoint-view-and-filters/</link>
		<comments>http://blog.pentalogic.net/2008/10/advanced-sharepoint-view-and-filters/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 17:26:41 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Filter]]></category>
		<category><![CDATA[SharePoint Ideas]]></category>
		<category><![CDATA[filters]]></category>
		<category><![CDATA[Formula]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[View]]></category>

		<guid isPermaLink="false">http://blog.pentalogic.net/?p=49</guid>
		<description><![CDATA[Advanced SharePoint view and filter techniques focusing on the task list.  includes filters for My Overdue Tasks and Tasks Due in the next 7 Days. 


Related posts:<ol><li><a href='http://blog.pentalogic.net/2010/06/how-to-setup-sharepoint-view-filter-to-compare-2-list-fields/' rel='bookmark' title='Permanent Link: How To setup a SharePoint view filter to compare 2 list fields'>How To setup a SharePoint view filter to compare 2 list fields</a> <small>SharePoint workaround to create a list view based on a...</small></li>
<li><a href='http://blog.pentalogic.net/2009/11/howto-filter-items-current-calendar-month-view-sharepoint/' rel='bookmark' title='Permanent Link: How To Use Filters in SharePoint to show items in the current Calendar Month'>How To Use Filters in SharePoint to show items in the current Calendar Month</a> <small> Its very easy using the Filter feature of SharePoint...</small></li>
<li><a href='http://blog.pentalogic.net/2008/11/the-truth-about-using-today-in-filters/' rel='bookmark' title='Permanent Link: The &#8230; ehem&#8230; Truth about using [Today] in SharePoint Filters'>The &#8230; ehem&#8230; Truth about using [Today] in SharePoint Filters</a> <small>This post looks at the different requirement for using [Today]...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float:right; margin-top:-100px; clear:both;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.pentalogic.net%2F2008%2F10%2Fadvanced-sharepoint-view-and-filters%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.pentalogic.net%2F2008%2F10%2Fadvanced-sharepoint-view-and-filters%2F&amp;source=pentalogic&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<h3>Introduction</h3>
<p>We discussed in a  previous article how to customise <a title="Customise Task List" href="http://blog.pentalogic.net/2008/10/extend-and-customise-sharepoint-task-lists/">SharePoint&#8217;s built in Task List</a> and briefly looked at the power of Views with Filters. In this article we will build upon that by demonstrating some advanced use of Filters.</p>
<p>This article assumes that you are already familiar with Views and Filters &#8211;  if not please review the  <a title="Customise SharePoint Task List" href="http://blog.pentalogic.net/2008/10/extend-and-customise-sharepoint-task-lists/">previous article</a>.</p>
<p><span id="more-49"></span></p>
<h3>Overdue Tasks</h3>
<table id="table2" style="width: 100%;" border="0" cellspacing="0" cellpadding="3">
<tbody>
<tr>
<td>To show a task lists Overdue tasks use the following Filter :-</p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<ul>
<li>Status &#8211; is not equal to &#8211; Completed</li>
</ul>
<p>And</p>
<ul>
<li>Due Date &#8211; is less than &#8211; [Today]</li>
</ul>
<p><em>Note &#8211; [Today] is a special marker that SharePoint understands as  		the current date.</em></p>
</td>
<td><img class="aligncenter size-full wp-image-50" title="adv-filter-overdue-tasks" src="http://blog.pentalogic.net/wp-content/uploads/2008/10/adv-filter-overdue-tasks.gif" alt="Overdue Tasks" width="408" height="236" /></td>
</tr>
</tbody>
</table>
<h3>My Overdue Tasks</h3>
<table id="table1" style="width: 100%;" border="0" cellspacing="0" cellpadding="3">
<tbody>
<tr>
<td>Add the following to the Overdue Tasks filter</p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<ul>
<li>Assigned To &#8211; is equal to &#8211; [Me]</li>
</ul>
<p><em>Note &#8211; [Me] is a special marker that SharePoint understands as the  		current user.</em></p>
</td>
<td><img class="aligncenter size-full wp-image-51" title="adv-filter-my-overdue-tasks" src="http://blog.pentalogic.net/wp-content/uploads/2008/10/adv-filter-my-overdue-tasks.gif" alt="" width="408" height="91" /></td>
</tr>
</tbody>
</table>
<h3><strong>Items added in Last 7 Days</strong></h3>
<p>It would be nice to be able to enter something like</p>
<ul>
<li>Created &#8211; is less than &#8211; [Today] &#8211; 7</li>
</ul>
<p>in the filter, but alas its not quite that simple!</p>
<p><em><a href="http://blog.pentalogic.net/2008/11/the-ehem-truth-about-using-today-in-filters/">[EDIT - This work around was written in early 2006 and WSS 2 / SPS 2003 wouldn't accept this - in WSS 3 / MOSS 2007 you can now use a FILTER formula like [Today]-7 as long as you keep the spaces out!]</a></em></p>
<p>The workaround is to create a Calculated column and then filter on that  column.</p>
<table id="table3" class="layoutTableSeperated" style="width: 100%;" border="0" cellspacing="0" cellpadding="3">
<tbody>
<tr>
<td>Select <strong>Modify Settings and Columns</strong>, then <strong>Add a new column</strong>Give the column name something like &#8220;Filter 7 Days&#8221; and select a <strong> Calculated</strong> column</td>
<td>
<p style="text-align: center;"><img class="size-full wp-image-52 aligncenter" title="adv-filter-7-days" src="http://blog.pentalogic.net/wp-content/uploads/2008/10/adv-filter-7-days.gif" alt="Name the view &quot;Filter 7 Days&quot;" width="322" height="188" /></p>
</td>
</tr>
<tr>
<td>Enter a suitable <strong>Description</strong>In the <strong>Formula</strong> box  		enter &#8220;=Created+7&#8243;Choose <strong>Date and Time</strong> format and <strong>Date Only</strong></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p>Clear <strong>Add to default view</strong> as we don&#8217;t want this field to  		appear on any of the views</p>
</td>
<td><img class="aligncenter size-full wp-image-53" title="adv-filter-7-days-formula" src="http://blog.pentalogic.net/wp-content/uploads/2008/10/adv-filter-7-days-formula.gif" alt="Set the calculated columns formula" width="322" height="288" /></td>
</tr>
<tr>
<td>Create a new viewSetup a filter to show only :-</p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<ul>
<li>Filter 7 Days &#8211; is greater than or equal to &#8211; [Today]</li>
</ul>
</td>
<td><img class="aligncenter size-full wp-image-54" title="adv-filter-7-days-filter" src="http://blog.pentalogic.net/wp-content/uploads/2008/10/adv-filter-7-days-filter.gif" alt="Set the views filter" width="340" height="130" /></td>
</tr>
</tbody>
</table>
<h3>Items Due in the next 7 Days</h3>
<p><em><a href="http://blog.pentalogic.net/2008/11/the-ehem-truth-about-using-today-in-filters/">[EDIT - This work around was written in early 2006 and WSS 2 / SPS 2003 wouldn't accept this - in WSS 3 / MOSS 2007 you can now use a FILTER formula like [Due Date]-7 as long as you keep the spaces out!]</a></em></p>
<table id="table4" class="layoutTableSeperated" style="width: 100%;" border="0" cellspacing="0" cellpadding="3">
<tbody>
<tr>
<td>Select <strong>Modify Settings and Columns</strong>, then <strong>Add a new column</strong>Give the column name something like &#8220;Filter Coming Due&#8221; and select a <strong> Calculated</strong> column</td>
<td><a href="http://blog.pentalogic.net/wp-content/uploads/2008/10/adv-filter-coming-due-name.gif"><img class="aligncenter size-full wp-image-56" title="adv-filter-coming-due-name" src="http://blog.pentalogic.net/wp-content/uploads/2008/10/adv-filter-coming-due-name.gif" alt="Set the new columns name and choose &quot;calculated column&quot;" width="323" height="173" /></a></td>
</tr>
<tr>
<td>Enter a suitable <strong>Description</strong>In the <strong>Formula</strong> box  		enter &#8220;=Due Date-7&#8243;Choose <strong>Date and Time</strong> format and <strong>Date Only</strong></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p>Clear <strong>Add to default view</strong> as we don&#8217;t want this field to  		appear on any of the views</p>
</td>
<td><a href="http://blog.pentalogic.net/wp-content/uploads/2008/10/adv-filter-coming-due-formula.gif"><img class="aligncenter size-full wp-image-57" title="adv-filter-coming-due-formula" src="http://blog.pentalogic.net/wp-content/uploads/2008/10/adv-filter-coming-due-formula.gif" alt="Set the calculated columns formula" width="320" height="286" /></a></td>
</tr>
<tr>
<td>Create a new viewSetup a filter to show only :-</p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<ul>
<li>Status &#8211; is not equal to &#8211; Completed</li>
</ul>
<p>And</p>
<ul>
<li>Filter Coming Due &#8211; is less than or equal to &#8211; [Today]</li>
</ul>
<p>And</p>
<ul>
<li>Due Date &#8211; is greater than or equal to &#8211; [Today]</li>
</ul>
<p>This will ensure that the view only displays Uncompleted items that  		are due in the next 7 Days but are not Overdue.</p>
</td>
<td><a href="http://blog.pentalogic.net/wp-content/uploads/2008/10/adv-filter-coming-due.gif"><img class="aligncenter size-full wp-image-55" title="adv-filter-coming-due" src="http://blog.pentalogic.net/wp-content/uploads/2008/10/adv-filter-coming-due.gif" alt="Set the filter" width="343" height="301" /></a></td>
</tr>
</tbody>
</table>
<h3>Items due in the current Calendar Month</h3>
<p>If you need to filter for a Calendar Week/Month (rather than a rolling 7/30 day period) then this post details how</p>
<p><a href="http://blog.pentalogic.net/2009/11/howto-filter-items-current-calendar-month-view-sharepoint/">How To Use Filters in SharePoint to show items in the current Calendar Month</a></p>


<p>Related posts:<ol><li><a href='http://blog.pentalogic.net/2010/06/how-to-setup-sharepoint-view-filter-to-compare-2-list-fields/' rel='bookmark' title='Permanent Link: How To setup a SharePoint view filter to compare 2 list fields'>How To setup a SharePoint view filter to compare 2 list fields</a> <small>SharePoint workaround to create a list view based on a...</small></li>
<li><a href='http://blog.pentalogic.net/2009/11/howto-filter-items-current-calendar-month-view-sharepoint/' rel='bookmark' title='Permanent Link: How To Use Filters in SharePoint to show items in the current Calendar Month'>How To Use Filters in SharePoint to show items in the current Calendar Month</a> <small> Its very easy using the Filter feature of SharePoint...</small></li>
<li><a href='http://blog.pentalogic.net/2008/11/the-truth-about-using-today-in-filters/' rel='bookmark' title='Permanent Link: The &#8230; ehem&#8230; Truth about using [Today] in SharePoint Filters'>The &#8230; ehem&#8230; Truth about using [Today] in SharePoint Filters</a> <small>This post looks at the different requirement for using [Today]...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.pentalogic.net/2008/10/advanced-sharepoint-view-and-filters/feed/</wfw:commentRss>
		<slash:comments>60</slash:comments>
		</item>
	</channel>
</rss>
