Adding filters to an Analyzer report (archive)

Archived. Content merged into "Pentaho Analyzer".

In Pentaho Analyzer, filters are used to restrict or limit data in a report, so you can build the report to show only the information that you want to view. For example, a typical report shows sales by product line. By applying a date filter on Quarter, you can restrict the data so that only sales for the one quarter are shown. If you add a string filter for Europe, the report would display data for the European sales that quarter. If you add a string filter on another field to exclude a product line, the report would display European sales data in that quarter minus the excluded product.

Filter types

Use these filter types to refine your report data:

Add a filter

Use these steps to add a filter with Select from a list.

  1. Log in to the User Console.

  2. Open an existing Analyzer report.

  3. If you are creating a new report, do this:

    1. Select the data source you want.

    2. Click OK.

    3. Add report fields in the Layout panel.

  4. Click the Add A Filter icon.

    A workspace for filters appears near the top of the report.

  5. Drag a field into the filter workspace from the Available Fields pane.

    The Filter dialog box opens. Select from a list is selected.

  6. In Currently, select Included or Excluded.

    Filter dialog box with the Select from a list option selected.
  7. In Add Selected, select one or more values.

  8. Click the Arrow to move selected values to the right pane.

    Click the Double Arrow to move all values.

    Filter dialog box with values selected.
  9. Click OK.

  10. Save your report.

    Click Undo or Reset to return to the previous version.

Date range filters

Date range filters show only data that matches a time period.

For example, you can filter between 2010 and 2013. You can also filter after 2010.

  1. Log in to the User Console.

  2. Open an existing analysis report that includes a time dimension.

  3. Or, create a new report:

    1. Click Create New > New Analysis.

    2. Select the data source you want.

    3. Click OK.

  4. Add a time dimension to the report, such as year or quarter.

  5. Click the Add A Filter icon.

  6. Drag the time dimension to the Filters board.

    You can also right-click the dimension and add it as a filter.

  7. Choose one of these options:

    • Choose a commonly used time period: Select a time period, then click OK.

      This filter is dynamic. It changes with the current date. Other date filters are static.

      Filter on Quarters dialog box
    • Select from a list: Select values, then click OK.

      Use the single and double arrows to move one or all values.

      Select from a list option
    • Select a range: Click Select from date picker. Select a start and end date. Click Apply, then OK.

      Select a range option displays the date picker

Once you select a date, Analyzer validates the range.

Analyzer searches for the nearest time period, up to ±30 time periods.

You cannot save the filter if Analyzer cannot find a match.

circle-info

The Choose a commonly used time period and Between, After, Before filters are available only if time dimension levels are set up with the AnalyzerDateFormat annotation.

circle-info

If you create a date range filter with the Between (and incl.) operator and parameterize it (see Add query parameters to Analyzer reports), you specify one parameter name, but Analyzer creates two parameters:

  • <YourParameterName>_START

  • <YourParameterName>_END

Comparison filters on numeric levels

Comparison filters show only data that matches a numeric condition.

For example, you can create Credit Score > 600.

circle-info

The operator list does not include Equals, Not Equals, and Is Not Empty. Use Included and Excluded for the same behavior.

  1. Log in to the User Console.

  2. Open your Analyzer report.

  3. Click the Add A Filter icon.

  4. Drag a field into the Filters workspace.

    The Filter dialog box opens.

  5. Select Greater / Less Than, Between, etc..

    Filter dialog box
  6. Select a comparison operator, such as Greater Than, Less Than, Greater Than or Equals, Less Than or Equals, or Between.

  7. Enter the value or range.

  8. Click OK.

  9. Save your report.

    Click Undo or Reset to return to the previous version.

String filters on levels

String filters match (or exclude) specific text in a field.

  1. Log in to the User Console.

  2. Open your Analyzer report.

  3. Click the Add A Filter icon.

  4. Drag a field into the filters workspace.

    The Filter dialog box opens.

  5. Select Match a specific string.

    Match a specific string
  6. Select a match type, such as Contains or Doesn’t Contain.

  7. Enter the string value.

  8. Optional: Click Add another value to refine the filter.

  9. Click OK.

  10. Save your report.

    Click Undo or Reset to return to the previous version.

Filters on measure values

Measure filters apply conditions to measure data.

You specify one or more measures and one level field. The level field defines the values to filter.

If you remove the level field from the report, Analyzer removes the measure filter.

Restrictions

  • You can have only one measure filter per report.

  • You cannot use calculated fields.

  • Analyzer applies the measure filter after other filters.

Measure filter types

  • Greater/Less Than, Equal to, etc.

  • Top 10, etc.

  1. Log in to the User Console.

  2. Open your Analyzer report.

  3. Click the Add A Filter icon.

  4. Drag a field into the Filters workspace.

    The Filter dialog box opens.

  5. Select Greater/Less Than, Equal to, etc. and/or Top 10, etc..

    circle-info

    If you select both types, Analyzer applies Greater/Less Than, Equal to, etc. first.

    Measure Filter dialog box
  6. If you selected Greater/Less Than, Equal to, etc., do this:

    1. In the measure field, select a measure, such as Quantity or Sales.

    2. In the filter field, select an operator, such as Greater Than or Equals.

    3. In the level field, enter the value.

      Measure filter selection
  7. If you selected Top 10, etc., do this:

    1. Select Top or Bottom.

    2. Enter the number of items.

    3. In by [measure], select the measure to rank by.

      Measure filter selection for Top 10 filter
  8. Click OK.

  9. Save your report.

    Click Undo or Reset to return to the previous version.

Set default filters for new reports

Default filters apply automatically when users create new reports.

Default filters are not applied to existing reports.

  1. Add the filters you want as defaults to a report.

  2. Click More actions.

  3. Select Default Filters > Set for New Reports.

    Other options are Remove for New Reports and Reset to default.

  4. In the alert dialog box, click OK.

New reports based on the modified report will use the default filters.

circle-info

Filters you add in chart view display in the filters workspace. They are not saved as default filters.

Last updated

Was this helpful?