Adding Static Filters to Content


Filters allow you to limit the data that displays in your content, making it easier to find useful information by removing extraneous data values. You can create prompted filters, which allow users to select the filter values to use in your content at run time, or you can create static filters, which are always applied to your content whenever it is run. Prompted filters allow you create controls when the content that uses them is added to a page, while static filters do not. Additionally, prompted filters affect all new content on the page, or any referenced content that uses the filter. Static filters, on the other hand, affect only the item for which the filter was created.

Static filters are a good choice when you want the same filter values to be applied to your content at all times, or want to create a filter that only affects a single content item.

To create a static filter, when creating a new chart or report, drag a field into the Filters bucket on the Display pane. The Add Filter dialog box opens, and presents options relevant to the type of field that you are filtering.

These options also differ depending on whether you are filtering compared to selected values or to another field. You can change this option by setting the Compare to option to Value or Field.

When you set the Compare to option to Value you can filter alphanumeric fields using the following options:

  • Select values. When using the Value comparison type, select the values that will be used to define the filter.
    • Select from data. Search for and select values from the data source used in your content.

      Click Load values from data to display all available values from the selected field in the left list. Select one or more values and click Add to add them to the list of selected filter values on the right. To remove a value from the list of selected filter values, select one or more values and click Remove. You can also click Clear List to remove all selected values.

    • Select from file. Allows you to pull data values from a file on your system. You can select a delimited flat file, such as a CSV file, or an Excel spreadsheet from which to import values for selection. These values are taken from the first column of the file. This option can be an easy way to select a large number of values that are found in another data source.

      Click Load values from file to select a data file and display all available values from it in the left list. Select one or more values and click Add to move them to the list of selected filter values on the right. To remove values from the list of selected filter values, select one or more values and click Remove, or click Clear List to remove all values.

    • Enter manually. Type a value and click Add or press the Enter key to move it to the list of selected filter values on the right. Multiple values must be typed separately. You can also choose whether or not to include missing or blank values in the filter. To remove a value from the list of selected filter values, select one or more values and click Remove, or click Clear List to remove all selected values.
       
    • Wildcard. Manually type a single string that you can use to select multiple filter values. You can specify that the values in your content should start with the string, end with the string, or contain the string at any point. Wildcard value filtering is case-sensitive. You cannot use a wildcard filter value at the same time as specified values.
  • Exclude. Available when using the Value comparison type. When the Exclude check box is selected, the values selected for hte filter are excluded from the request. When cleared, which is the default state, the selected values are included.

The Add Filter dialog box when filtering an alphanumeric field is shown in the following image.


Add Filter dialog for an alphanumeric field

When you set the Compare to option to Value, you can filter numeric fields using the following options:

  • Select values. Select the values or field that will be used to define the filter.
    • Select ranges. Provides options to specify a range of values for your filter. When selecting data ranges, you can apply an aggregation option to use when filtering the selected field. Use None to filter on data values before aggregation, or use a different aggregation to filter on sorted values, aggregated by the selected operation. For example, use Summary to filter by measure values summed for each sort value. For more information, see Summarizing Numeric Data Using Filters.
      • Single value. Select a filter operator, then filter for all values before or after a selected start or end point. You can select a value using the slider or type a value into the text box.
      • Range of values. Set a static range of values to use for the filter. Select a start and end point using the slider or text boxes, and set filter operators for each.

      You can type a value that is outside the range of values in your data. In this case, the text box displaying the value is outlined in purple and a message indicates that the value is out of range.

    • Select from data. Search for and select values from the data source containing the filter field.

      Click Load values from data to display all available values from the selected field in the left list. Select one or more values and click Add to add them to the list of selected filter values on the right. To remove a value from the list of selected filter values, select one or more values and click Remove. You can also click Clear List to remove all selected values.

    • Select from file. Allows you to pull data values from a file on your system. You can select a delimited flat file, such as a CSV file, or an Excel spreadsheet from which to import values for selection. These values are taken from the first column of the file. This option can be an easy way to select a large number of values that are found in another data source.

      Click Load values from file to select a data file and display all available values from it in the left list. Select one or more values and click Add to move them to the list of selected filter values on the right. To remove values from the list of selected filter values, select one or more values and click Remove, or click Clear List to remove all values.

    • Enter manually. Type a value and click Add or press the Enter key to move it to the list of selected filter values on the right. Multiple values must be typed separately. You can also choose whether or not to include missing or blank values in the filter. To remove a value from the list of selected filter values, select one or more values and click Remove, or click Clear List to remove all selected values.
  • Exclude. Available when using the Value comparison type. When the Exclude check box is selected, the values selected for the filter are excluded from the request. When cleared, which is the default state, the selected values are included.

The Add Filter dialog box when filtering a measure field is shown in the following image.


Add Filter dialog for numeric field

When you set the Compare to option to Value, you can filter date fields using the following options:

  • Select values. Select the values or field that will be used to define the filter.
    • Select ranges. Provides options to specify a range of dates for your filter.
      • Single date. Filter for all dates before or after a selected start date or end date, by selecting a filter operation and a date value.
      • Range of dates. Set a static range of dates to use for the filter by selecting a start and end date and setting filter operators for each.
    • Select from data. Search for and select values from the data source containing the filter field.

      Click Load values from data to display all available values from the selected field in the left list. Select one or more values and click Add to add them to the list of selected filter values on the right. To remove a value from the list of selected filter values, select one or more values and click Remove. You can also click Clear List to remove all selected values.

    • Select from file. Allows you to pull data values from a file on your system. You can select a delimited flat file, such as a CSV file, or an Excel spreadsheet from which to import values for selection. These values are taken from the first column of the file. This option can be an easy way to select a large number of values that are found in another data source.

      Click Load values from file to select a data file and display all available values from it in the left list. Select one or more values and click Add to move them to the list of selected filter values on the right. To remove values from the list of selected filter values, select one or more values and click Remove, or click Clear List to remove all values.

    • Enter manually. Type a value and click Add or press the Enter key to move it to the list of selected filter values on the right. Multiple values must be typed separately. You can also choose whether or not to include missing or blank values in the filter. To remove a value from the list of selected filter values, select one or more values and click Remove, or click Clear List to remove all selected values.
  • Exclude. Available when using the Value comparison type. When the Exclude check box is selected, the values selected for the filter are excluded from the request. When cleared, which is the default state, the selected values are included.

The Add Filter dialog box when filtering a date field is shown in the following image.


Add Filter dialog box for a date field

Set the Compare to value to Field to filter the selected field in relation to another field in the request. For example, you could use this filter to identify values for which the revenue was less than the cost of goods sold. When filtering by compared field values, the following options are available:

  • Source aggregation. Available only for numeric fields. Select an aggregation option to use for filtering the selected field. Use None to filter on data values before aggregation, or use a different aggregation to filter on sorted values, aggregated by the selected operation. For example, use Summary to filter by measure values summed for each sort value.
    • Operator. Set the relationship that will define how the filter is applied. Options are:
      • Equal to. Values display in your content if they match the specified filter values.
      • Not equal to. Values display in your content if they do not match the filter values.
      • Greater than or equal to. Values display in your content if they match the selected filter values, come after them alphabetically, or have a higher numeric value.
      • Greater than. Values display in your content if they come after the selected filter value alphabetically or have a higher numeric value.
      • Less than or equal to. Values display in your content if they match the selected filter value, come before it alphabetically, or have a lower numeric value.
      • Less than. Values display in your content if they come before the selected filter value alphabetically or have a lower numeric value.
    • Compare aggregation. Select an aggregation to apply to the field that the selected field is being compared to. Use None to compare to data values before aggregation, or use a different aggregation to compare to sorted values, aggregated by the selected operation. For example, use Summary to compare values from the selected field to values in the comparison field summed for each sort value.
    • Compare field. When using the Field comparison type, provides a list of fields in your data source. Values from the field for which you are creating the filter are compared to those in the comparison field and filtered out based on the selected operator.

The Add Filter dialog box when filtering a numeric field by comparison to another field is shown in the following image.


Add Filter dialog box when comparing to another field