3 Creating and Applying Filters for Visualizing Data

This topic describes how you can use filters to find and focus on the data you want to explore.

Typical Workflow for Creating and Applying Filters

Here are the common tasks for creating and applying filters to projects, visualizations, and canvases.

Task Description More Information
Choose the appropriate filter type Filter types (Range, Top / Bottom N filter, List, Date, and Expression) are specific to either a project, visualization, or canvas.

Applying Range Filters

Applying Top or Bottom N Filters

Applying List Filters

Applying Date Filters

Create filters on projects and visualizations Create filters on a project or visualization to limit the data displayed and focus on a specific section or category.

Creating Filters on a Project

Creating Filters on a Visualization

Build and use expression filters You can build and use expression filters to define more complex filters using SQL expressions. Building Expression Filters
Set visualization interaction properties Define how you want visualizations to affect each other. How Visualizations and Filters Interact

About Filters and Filter Types

Filters reduce the amount of data shown in visualizations, canvases, and projects.

The Range, List, Date, and Expression filter types are specific to either a visualization, canvas, or project. Filter types are automatically determined based on the data elements you choose as filters.

  • Range filters: Generated for data elements that are number data types and that have an aggregation rule set to something other than none. Range filters are applied to data elements that are measures, and that limit data to a range of contiguous values, such as revenue of $100,000 to $500,000. Or you can create a range filter that excludes (as opposed to includes) a contiguous range of values. Such exclusive filters limit data to noncontiguous ranges (for example, revenue less than $100,000 or greater than $500,000). See Applying Range Filters.

  • List filters: Applied to data elements that are text data types and number data types that aren’t aggregatable. See Applying List Filters.

  • Date filters: Use calendar controls to adjust time or date selections. You can either select a single contiguous range of dates, or you can use a date range filter to exclude dates within the specified range. See Applying Date Filters.

  • Expression filters: Let you define more complex filters using SQL expressions. See Building Expression Filters.

How Visualizations and Filters Interact

There are several ways that filters can interact with visualizations in a project. For example, filters might interact differently with visualizations depending on the number of data sets, whether the data sets are joined, and what the filters are applied to.

How Data Sets Interact with Filters

Various factors affect the interaction of data sets and filters in projects:

  • The number of data sets within a project.

  • The data sets that are joined (connected) or not-joined (for a project with multiple data sets).

  • The data elements (columns) that are matched between joined data sets.

You can use the Data Diagram in the Prepare canvas of a project to:

  • See joined and not-joined data sets.

  • Join or connect multiple data sets by matching the data elements in the data sets.

  • Disconnect the data sets by removing matched data elements.

How the Number of Data Sets Interact with Filters in a Project

You can add filters to the filter bar or to individual visualizations in a project.

Number of Project Data Sets Filter Interaction
Single Data Set
  • If you add filters to the filter bar, they apply to all visualizations in the project.

  • If you add a filter to a visualization, it is applied after filters on the filter bar are applied.

  • If you add multiple filters, then by default the filters restrict each other based on the values that you select.

Multiple Data Sets
  • If you add filters to the filter bar:

    • The filters apply to all the visualizations using the joined data sets. For visualizations using the not-joined data sets, you must add a separate filter to each data set.

    • You can't specify data elements of a data set as a filter of other data sets, if the two data sets aren't joined.

    • If a data element of a data set is specified as a filter, but doesn’t match the joined data sets, then the filter applies only to the visualization of that particular data set, and does not apply to other visualizations of joined or not-joined data sets.

    • You can select Pin to All Canvases of a filter, to apply a filter to all canvases in the project.

  • Hover the mouse pointer over a filter name to see the visualization to which the filter is applied. Any visualizations that don't use the data element of the filter are grayed out.

  • If you add filters to visualizations:

    • If you specify a filter on an individual visualization, that filter applies to that visualization after the filters on the filter bar are applied.

    • If you select the Use as Filter option and select the data points that are used as a filter in the visualization, then filters are generated in the other visualizations of joined data sets and matched data elements.

You can use the Limit Values By options to remove or limit how the filters in the filter bar restrict each other.

Synchronizing Visualizations in a Project

You use the Synchronize Visualizations setting to specify how the visualizations on your canvas interact. By default, visualizations are linked for automatic synchronization. You can deselect Synchronize Visualizations to unlink your visualizations and turn automatic synchronization off.

When Synchronize Visualizations is on (selected), then all filters on the filter bar and actions that create filters (such as Drill) apply to:

  • All the visualizations in a project with a single data set.

  • All the visualizations of joined data sets with multiple data sets.

    If a data element from a data set is specified as a filter but isn't matched with the joined data sets, then the filter only applies to the visualization of the data set that it was specified for.

Note:

  • When you hover the mouse pointer over a visualization to see the filters applied to the visualization, any filter that isn't applied to the visualization is grayed out.

  • Any visualization-level filters are applied only to the visualization.

  • When Synchronize Visualizations is off (deselected), then analytic actions such as Drill affect the visualization to which you applied the action.

    The analytic actions such as Drill affect only the visualization to which you applied the action.

About Automatically Applied Filters

By default, the filters in the filter bar and filter drop target are automatically applied. However, you can turn this behavior off if you want to manually apply the filters.

When the Auto-Apply Filters is selected in the filter bar menu, the selections you make in the filter bar or filter drop target are immediately applied to the visualizations. When Auto-Apply Filters is off or deselected, the selections you make in the filter bar or filter drop target aren’t applied to the canvas until you click the Apply button in the list filter panel.

Creating Filters on a Project

You can add filters to limit the data that’s displayed in the visualizations on the canvases in your project.

If your project contains multiple data sets and some aren’t joined, then there are restrictions for how you can use filters. Any visualization that doesn't use the data element of the filter is grayed out. See How Visualizations and Filters Interact.

Instead of or in addition to adding filters to the project or to an individual canvas, you can add filters to an individual visualization. See Creating Filters on a Visualization.

  1. Click + Add Filter, and select a data element. Alternatively, drag and drop a data element from the Data Elements pane to the filter bar.

    You can't specify data elements of a data set as a filter of other data sets, if the two data sets aren’t joined. See How Visualizations and Filters Interact.

  2. Set the filter values. How you set the values depends upon the data type that you’re filtering.

  3. (Optional) Click the filter bar menu or right-click on the filter bar and select Add Expression Filter. See Building Expression Filters.

  4. (Optional) Click the filter’s Menu and hover the mouse pointer over the Limit Value By option to specify how the filter interacts with the other filters in the filter bar. Note the following:

    • By default, the Auto option causes the filter to limit other related filters in the filter bar.

      For example, if you have filters for Product Category and Product Name, and if you set the Product Category filter to Furniture and Office Supplies, then the options in the Product Name filter value pick list is limited to the product names of furniture and office supplies. You can select None to turn this limit functionality off.

    • You can specify any individual filter in the filter bar that you don’t want to limit.

      For example, if you have filters for Product Category, Product Sub Category, and Product Name, and in the Limit Value By option for the Product Category filter you click Product Sub Category, then the product subcategory filter shows all values and not a list of values limited by what you select for Product Category. However, the values shown for Product Name is limited to what you select for Product Category.

  5. (Optional) Click the filter bar menu or right-click on the filter bar, select Auto-Apply Filters, then click Off to turn off the automatic apply. When you turn off the automatic apply, then each filter’s selection displays an Apply button that you must click to apply the filter to the visualizations on the canvas.

  6. Click the filter bar menu or right-click on the filter bar, and select Pin to All canvases of a filter to apply a filter to all canvases in the project.

Creating Filters on a Visualization

You can add filters to limit the data that’s displayed in a specific visualization on the canvas.

If a project contains multiple data sets and some aren't joined, then there are restrictions for how you can use filters. Any visualization that doesn't use the data element of the filter is grayed out. See How Visualizations and Filters Interact.

Visualization filters can be automatically created by selecting Drill on the visualization’s Menu when the Synchronize Visualizations option in the project’s Canvas Settings menu is turned off.

Instead of or in addition to adding filters to an individual visualization, you can add filters to the project or to an individual canvas. See Creating Filters on a Project. Any filters included on the canvas are applied before the filters that you add to an individual visualization.

  1. Confirm that the Visualize canvas is displayed.
  2. In the Visualize canvas, select the visualization that you want to add a filter to.
  3. From the Data Elements pane, drag a data element to the Filter section in the Visualization Grammar Pane. If the two data sets aren’t joined, then you can't use data elements of a data set as a filter in the visualization of another data set.
  4. Set the filter values. How you set the values depends upon the data type that you’re filtering.
  5. (Optional) Click the filter bar menu or right-click on the filter bar, select Auto-Apply Filters, then click Off to turn off automatic apply for all filters on the canvas and within the visualization. When you turn off automatic apply, then each filter’s selection displays an Apply button that you must click to apply the filter to the visualization.

Moving Filter Panels

You can move filter panels from the filter bar to a different spot on the canvas.

When you expand filters in the filter bar, it can block your view of the visualization that you’re filtering. Moving the panels makes it easy to specify filter values without having to collapse and reopen the filter selector.

Applying Range Filters

You use Range filters for data elements that are number data types and that have an aggregation rule set to something other than none.

Range filters are applied to data elements that are measures. Range filters limit data to a range of contiguous values, such as revenue of $100,000 to $500,000. Or you can create a range filter that excludes (as opposed to includes) a contiguous range of values. Such exclusive filters limit data to two noncontiguous ranges (for example, revenue less than $100,000 or greater than $500,000).
  1. In the Visualize canvas, go to the filter bar and click the filter to view the Range list.
  2. In the Range list, click By to view the selected list of Attributes. All members that are being filtered have check marks next to their names.

    You can also optionally perform any of the following steps:

    • In the selected list click a member to remove it from the list of selections. The check mark disappears.

    • In the selected list, for any non-selected member that you want to add to the list of selections, click the member. A check mark appears next to the selected member.

    • Click the Plus (+) icon, to add member to the selected list. The newly added member is marked as checked.

    • Set the range that you want to filter on by moving the sliders in the histogram. The default range is from minimum to maximum, but as you move the sliders, the Start field and End field adjust to the range you set.

  3. Click outside of the filter to close the filter panel.

Applying Top or Bottom N Filters

You use the Top / Bottom N filter to filter a measure to a subset of its largest (or smallest) values.

You apply top or bottom filters to data elements that are measures. When you add a measure to a filter drop target of a visualization, the default filter type is Range, but you can change the filter type to Top / Bottom N from the Filter Type menu option.
You can apply a Top / Bottom N filter to either a project canvas (it applies to all visualizations in the project), or to a selected visualization. All of the following steps are optional:
  1. To apply the Top / Bottom N filter to the canvas and all visualizations in the project:
    1. In the Visualize canvas, display the Filter Panel.
    2. Display the filter menu.
    3. Click the Filter Type menu option, and select Top / Bottom N.
  2. To apply the Top / Bottom N filter to a specific visualization in the project and update the filtered data on the canvas:
    1. In the Visualize canvas, display the Explore Panel.
    2. Click the filter in the Explore Panel and display the filter menu.
    3. Click the Filter Type menu option, and select Top / Bottom N.
  3. To change which filter method is applied, Top or Bottom, in the Top / Bottom N list, click the Method value.
  4. To display a particular number of top or bottom rows, in the Top / Bottom N list, click in the Count field and enter the number.
  5. To change which columns to group by, in the Top / Bottom N list, click in the By field, or to display the available columns that you can select from, click Plus (+).
  6. To deselect any member from the list of attributes, in the Attributes list, click the member that you want to deselect.
  7. To add a member to the list of attributes, in the Attributes list, click any nonselected member.
  8. Click outside of the filter to close the Filter Panel.

Applying List Filters

List filters are applied to text and non-aggregatable numbers. After you add a list filter, you can change the selected members that it includes and excludes.

  1. In the Visualize canvas, go to the filter bar and click the filter to view the Selections list.
    You can also use the Search field to find the members you want to add to the filter.
  2. Locate the member you want to include and click it to add it to the Selections list.
    Use the Search field to find a member you want to add to the filter. Use the wildcards * and ? for searching.
  3. You can also optionally perform any of the following steps:
    • In the Selections list click a member to remove it from the list of selections.

    • In the Selections list, you can click the eye icon next to a member to cause it to be filtered out but not removed from the selections list.

    • In the Selections list, you can click the actions icon at the top, and select Exclude Selections to exclude the members in the Selections list.

    • Click Add All or Remove All at the bottom of the filter panel to add or remove all members to or from the Selections list at one time.

  4. Click outside of the filter panel to close it. You can also perform the following steps:
    • Clear the filter selections or remove all filters at one time, right-click in the filter bar, and then select Clear Filter Selections or Remove All Filters.

    • Right-click the filter in the filter bar and select the Remove Filter.

Applying Date Filters

Date filters use calendar controls to adjust time or date selections. You can select a single contiguous range of dates, or use a date range filter to exclude dates within the specified range.

  1. In the Visualize canvas, go to the filter bar and click the filter to view the Calendar Date list.
  2. In Start, select the date that begins the range that you want to filter.
    Use the Previous arrow and Next arrow to move backward or forward in time, or use the drop-down lists to change the month or year.
  3. In End, select the date that ends the range that you want to filter.
  4. You can also optionally start over and select new dates in the filter. Click Action and select Clear Filter Selections.
  5. Click outside of the filter to close the filter panel.

Building Expression Filters

Using expression filters, you can define more complex filters using SQL expressions. Expression filters can reference zero or more data elements.

For example, you can create the expression filter "Sample Sales"."Base Facts"."Revenue" < "Sample Sales"."Base Facts"."Target Revenue". After applying the filter, you see the items that didn’t achieve their target revenue.

You build expressions using the Expression Builder. You can drag and drop data elements to the Expression Builder and then choose operators to apply. Expressions are validated for you before you apply them. See About Composing Expressions.

  1. In the Expression Filter panel, compose an expression.
  2. In the Label field, give the expression a name.
  3. Click Validate to check if the syntax is correct.
  4. When the expression filter is valid, then click Apply. The expression is applied to the visualizations on the canvas.