mosta2
07-05-2024Data Storage
How to filter chart categories
I am new to Sisense, trying to build a simple chart where categories from datamodel need to be filtered before usage in x-axis I understand it can be filtered by values but I want to filter the table based on another column in same table example : Departments where Active =1
Also, I want to confirm that the Data Model has the "Departments" table with the "Active" column included. If so, try these steps.
Create a Filter at the Data Model Level:
- Open your data model.
- Go to the table where you want to apply the filter (e.g., "Departures").
- Click on the column (e.g., "Active").
- Apply a filter where
Active = 1
. This will ensure that only active departments are loaded into your dashboard.
Build the Chart:
- Go to your dashboard and add a new widget (chart).
- Select the type of chart you’d like to create.
- In the data tab, drag and drop the required fields onto the respective axes. For the X-axis, you can use the department's name or ID.
Apply Additional Filters (if needed):
- Once in the widget, you might want to apply additional filters or edit the existing ones.
- To apply a filter to a widget, click on the widget to select it, then go to the widget's settings.
- Here you can add a filter and define it such that
Active = 1
.
Managing Filters:
- If you want this filter to apply across multiple widgets on a dashboard, consider using a dashboard-level filter. This can be done by dragging the necessary column (Active) into the dashboard's filter pane and setting it to
1
.
Preview and Save:
- Once you have set up the chart and the filters as required, preview it to make sure it looks right.
- Save your dashboard.
Optimization and Performance:
- Double-check if filtering at the data model level (filtering the data before it is loaded into the dashboard) improves performance compared to applying filters at the widget or dashboard level.