This is part of the SAP Lumira Discovery blog series.
Filtering in SAP Lumira Discovery is possible by choosing values or ranges of values from a measures or dimension to include or exclude.
Filters applied to a dataset affect any component that uses the data. However, filters applied to a visualization affect only the current chart (not the entire dataset). When viewing stories, you can also filter data in individual visualizations, in an entire page, or in the whole story. A page filter applies to all the visualizations on the page. A visualization filter applies to a single visualization on a page. And a story filter applies to all pages.
1. Dimension Filter
Dataset filters allow you to easily filter a data list while working with large amounts of data. Add a filter to a dataset to limit the data in a report after the data is retrieved from an external data source. When you add a filter to a dataset, all report parts or data regions use only data that matches the filter conditions.
You use the filter dialog to define a filter on the dataset and all the visualizations based on it. The filter dialog does not support SAP Lumira Discovery formula language or regular expressions (regex). You need to add a calculated measure or dimension to create a more complex filter
Step 1 – Choose the visualization and select the Filter icon
Another way to create a filter is to drag a dimension directly from the Object Picker to the filter shelf.
Step 2 – Choose the dimension to filter
Click on the highlighted icon to select the dimension to be filtered
Step 3 – Filter by operator from list
The following screen pops up in which we can filter the dimension based on the operators available from the list. The filter can be applied for the current page or across all pages.
Step 4 – Choose the filter range
Choose Current Page to apply the filter only to the chart that you are working with, or choose All Pages to apply the filter to all visualizations in a story.
The data is filtered, and a token representing the filter is added above the Chart Canvas.
2. Measure Filter
This is a new feature in SAP Lumira Discovery 2.1. Measures can be used in combination with dimensions on a visualization to provide range based filtering along with categorical values. Measures cannot be filtered like how it is done with the dimensions. Visualizations should be maximized and then filter the measures.
Maximize the component where the measure filter needs to be applied.
Now click on the Filter icon to filter the measures.
The following screen pops up in which we can filter the measures based on the operators available from the list. The filter can be applied only for the selected component with a single value or a range of values.
Based on option contains the dimension available in the selected component. We can filter the measure based on a single dimension or all independently.
The data is filtered, and a token representing the filter is added above the crosstab.
Rank as Measure Filter
Other than the filter option from the global toolbar the measure can be filtered using rank
Right Click on the component and select rank option
Select Top N or Bottom N, so that the measures will be filtered accordingly.
Measure filter is possible only if the component is maximized. If the measure is available in the global toolbar just like how it is done with the dimension, it would be more ease for the developer.
3. Hierarchy Filter
Hierarchies allow you to view data at different levels of granularity. In charts that contain hierarchies, you can drill up and down through the different levels of data to gain a deeper understanding of the relationship between the dimensions and measures.
In SAP Lumira Discovery 2.1 new feature is added, where hierarchy structure is maintained within a filter, enabling ease of navigation.
Click on the Filter icon to filter the Dimension. The hierarchy structure is maintained within the filter enabling ease of navigation.
Select the level of hierarchy required and the filter page pops up. Filter the dimension based on the operators available from the list. The filter can be applied only for the selected component with a single value or range of values.
Unlike dimension and measure filter options, hierarchy provides only 4 options for filtering the data.
Contains & does not contain is available only with hierarchical dimension.
The data is filtered, and a token representing the filter is added above the chart canvas.
The SAP Lumira Discovery comes with robust drilldown and interaction capabilities. Even a custom and geo based hierarchy can be created. Please refer to the below links for more details about the feature-
Controls are used to interactively filter data in your story’s visualizations. Interactive filters in a story make it easy to highlight different areas of the data in the story.
The filter created by the control applies to each relevant visualization. You can add controls to a section in the story, or overlay the control on a visualization. A box indicates the placement of the control in the visualization. You can optionally re-size or move the control. Once you have included a filter, there are different options to control how it works and appears.
Select the insert control form the global toolbar
In the filter dialog, choose the dimension to filter. The Control Type dialog box appears with multiple options for you to choose from.
Choose the required Control Type and choose OK. The control is added to the story. The default operator is “Equals” for all the control types. However, if you select the Single Slider control type, then the operator is “less than equal to” and the default value is the maximum value from the dimension. If you select the Double Slider, then “between” is the default operator and the minimum and maximum values from the dimension represent the default values for sliders.
In SAP Lumira Discovery 2.1, there are 2 new features added for editing controls (Format header & body).
We can format these components based on the following options,
More details on the individual features can be found by clicking on the hyperlinks/title.
This information is based on the current product and roadmap and is bound to change.