Work with Filter Web Parts

Filter Web Parts change the view of the data displayed in another Web part based on certain criteria. For example, a filter Web Part might cause a financial report to display only values from a specific year, or cause a list of students in a class to display only the names of students who have completed a particular assignment.

The Filter Web part might display a filter icon on the page and require user input, such as a date or text, to create filter criteria. Alternatively, the Filter Web Part might operate automatically; it might not appear on the page, and might use criteria for filtering that are supplied from a third Web Part, such as a Current User filter. Filter Web Parts that are not visible on the page are called context Web Parts; they filter results automatically without user input.

Filter Web parts work with SharePoint lists, data from Microsoft SQL Server versions 2005 and 2008 Analysis Services, and data that resides in the Business Connectivity Services.

In this article

Ways to use filters

Types of filters

Using filters

Ways to use filters

The following scenarios illustrate two of the many ways that you can use filter Web Parts:

  • Jeff Smith wants to communicate the revenue generated by a product on a monthly basis. Historically, Jeff viewed a SQL Server Analysis Services report produced by the Contoso Sales application, and then copied the information into an e-mail message to distribute it to his team.

    Now, Jeff adds the same SQL Server Analysis Services report to his dashboard on a monthly basis, along with a report that shows customer complaints by product. Jeff adds a filter Web Part so that dashboard users can pick the product they are interested in. He sets up the filter to show a list of products, and he connects the filter to both the new customer complaints by product monthly report and the existing product revenue by month report. When his team members view the page, they can see data on the default product Jeff set for the reports, but they can also pick any product from a list. When a team member chooses a different product, the filter changes all of the data in each of the connected Web Parts.

  • Christina Lee, a regional sales manager, uses her division's dashboard to review monthly data. She notices that the customer satisfaction key performance indicator (KPI) is yellow, indicating it is in warning mode. She can click the indicator to go to a Web page that displays the indicator, an explanation of why it is yellow and three reports that provide additional insight.

    The filter displays only the page elements that apply specifically to Christina’s division. Other sales managers in Christina's company can view the same dashboard, but their view is different. The filter customizes each view for a particular division.

Top of Page

Types of filters

The type of filter Web Parts you use and how you use them depends on your data source, the type of interaction you want from the user, and the results you want. There are nine types of filters provided with Microsoft SharePoint Server 2010 along with the Filter Actions Web Part, which enables you to add a filter button to a page so that users can choose when to refresh the data on the page.

The following filter Web Parts allow users to specify the values manually that will filter the data displayed on the page:

Web Part


Date Filter

You can provide a default or leave the value blank. Users can pick a date from a drop-down calendar or enter the m/d/yyyy value into the box displayed on the Web page.

Text Filter

You can require that users enter text and/or provide default text.

The following filter Web Parts allow users to pick from a list of values:

Web Part


Choice Filter

The choice filter allows you to specify values in the tool pane of the Web Part. Users select one of the values from a drop-down menu that appears on the page.

Business Data Connectivity Filter

This Web Part allows you to specify a list of values from the Business Data Catalog and then specify Value column. In addition, you can add a Description column.

For example, if the entity is Products the AdventureWorks application and the Value column could be Name. If you add a Description column, this filter Web Part adds a picker dialog that enables the user to use a drop-down list to search for products by Description, Key, or Name.

SharePoint List Filter

When you configure this filter, you point to a SharePoint list and specify the value of a column, such as title, description, date, or document type. Users can browse to the list and then choose from the type of item you specify.

SQL Server Analysis Services Filter

This filter allows you to select a data connection from a Web Part on the current Web page or from a SharePoint Data Connection library or Office Data Connection library. You then specify a dimension and hierarchy. Users can choose from the resulting list of values.

These filter Web Parts automatically filter the data that displays on the Web page:

Web Part


Current User Filter

Provides either the current user’s login name or a selected SharePoint profile property

Query String (URL) Filter

Passes a fixed value(s) from another source that you configure in the tool pane

Page Field Filter

Provides the value of a column on the list row that is associated with the current page

Top of Page

Using filters

There are three steps to using a filter:

  • Add the filter to the Web page

  • Configure the filter settings

  • (Optionally) Connect the filter to other Web Parts on the page

Add a filter Web Part to a page

Adding a filter Web Part to a page is similar to adding any other Web Part to a page. When using a filter that will request user input, consider the placement of the Web Part on the page. In addition, the name that you specify for the filter in the tool pane serves as the description on the page for the text box or menu.

Configure the filter settings

You configure the settings of your filter by using the Web Part tool pane. Each tool pane has different options depending on the type of filter you are setting up.

Connect the filter to other Web Parts on the page

You might have to connect the filter Web Part that you use to another Web Part on the page. This might be the case when you use filters with Excel Web Access Web Parts. You can connect filter Web Parts that are either visible or invisible to the user. A visible filter Web Part may request input from the page viewer, such as selecting from a product list. An invisible filter Web Part, such as the Current User filter, automatically filters the data in the target Web Part based on the person who is logged on to the computer.

When a filter is available that you can connect to another Web Part on the page, the Connections menu is visible from the Web Part menu. You can initiate a connection between the filter Web Part and another Web Part on the page from either Web Part.

Top of Page

Share Facebook Facebook Twitter Twitter Email Email

Was this information helpful?

Great! Any other feedback?

How can we improve it?

Thank you for your feedback!