Best Practice: Use Filter Line for Filtering Table, Chart and R Visualization
Learn how to filter a Table, a Chart or an R Visualization using a Filter Line widget SAP Analytics Cloud, analytics designer.
Prerequisites
-
You've already added a table and a chart widget to your canvas and placed them on top of each other.
-
To follow all functions of this sample use case, you've completed the exercise Best Practice: Switch between Chart and Table and can now enhance your analytic application.
Context
Instead of loading all the dimensions in your data set into a checkbox group or a dropdown widget, you select specific dimensions to load into a filter line. Unlike other data bound widgets (such as table or chart), R visualization can add multiple input data models. To support R visualization in filter line, one dropdown list is added to select the connected input data.
Procedure
- Click and place this widget above your table.
- Change the name of the filter line to FilterLine. You do this on the Styling panel under Analytics Designer Properties or on the Layout panel under .
-
Select the filter line in your canvas and click Designer.
- Go to the Builder panel, and under source widget select Table.
- Under Dimension Selection click on Add Dimension and select Location, Product, Sales Manager and Store in the checklist.
-
To enable the option to toggle between table and chart you need to click on the fx next to the table in the
Layout and choose onResultChanged.
- Save the application and click Run Analytic Application.
Results
When you run the application it looks like this:
When you click on the filter line the 4 measures you added appear.
By clicking on one of the measures (in this example Location) a window pops up and lets you choose which members of that measure (in this example San Francisco, Las Vegas, and Portland) you want to include in the table or chart.
Table and chart will be updated and you can switch between them by using the table and chart images as in the best practice chapter before.