In AWS QuickSight, datasets provide a comprehensive export of data from MDA. To focus your reports on specific portions of this data or make them more manageable, filters allow you to narrow down the insights and tailor your reports to your needs.
Adding Filters
To apply filters to your data in AWS QuickSight, navigate to the Analyses List screen and select the analysis you want to edit. Alternatively, you can use the search bar on the landing page to quickly locate the specific analysis.
Notes: Dashboards in QuickSight are not editable, so filters must be added at the analysis level.
For Author Users: If you don't have access to the analysis but can view the dashboard, please contact our support team to request access.
For Reader Users: Readers do not have access to the analysis and can only interact with the dashboard as published.
Then select the visual to add a filter to (the visual selected should have a black outline around the outside, rather than a grey outline).
Adding filters can be done in four ways:
Click on the [+ ADD] button at the top of the Filters pane. Then, search for the field you want to filter on.
Click on the three dots next to the field in the Data pane and click “Add filter for this field” option.
On the selected visual, you can click on a data point (e.g., a cell in a table, a bar in a bar chart, or a sector in a pie chart), which will present the following options:
Focus only on X
Exclude X
Choosing either option will automatically create a filter for the visual. This filter will adjust the report to either display only X or exclude X from the report, depending on your selection.
You can select the visual you want to add a filter to, then click the filter icon from the icon pane. This method is ideal for adding multiple filter conditions and provides more advanced filtering options.
Applying Filters Across Multiple Visuals
When you create a filter, it is set by default to apply only to the visual where it was created. However, you can adjust the filter's scope to apply it across multiple visuals, saving time and effort from creating or editing individual filters for each visual.
To change a filter's scope, click on the filter and modify the “Applied to” settings at the top. This allows you to specify which visuals the filter should affect.
Filters in QuickSight can be configured with various scopes, offering flexibility in how and where they are applied.
1. Single Visual
- The filter applies only to the visual where it was created. This is the default scope for new filters.
2. Single Sheet
- The filter applies to every visual on the sheet that uses the same dataset. By clicking the > arrow under the scopes menu, you can choose specific visuals for the filter.
Apply Cross-datasets: Extends the filter to multiple datasets, provided the datasets contain a field with the same name as the one used for the filter.
Tip: If the field you want to filter on has different names across datasets, create a calculated field with the same name in each dataset and base it on the desired field. Then, use this calculated field as the filter criteria.
3. Cross-sheet
- The filter applies to every visual across all sheets that use the same dataset. The > arrow allows you to select specific sheets for the filter.
Apply Cross-datasets: This functions similarly to the “Single Sheet” scope but extends the filter across multiple sheets.
If a control is created for the filter, it will replicate across the sheets where the filter is applied.
OR Filter Condition
When filters are added to visuals as separate filters, the data must satisfy all conditions (AND logic) to be displayed. If you want the visual to show data where any one of multiple conditions is met (OR logic), you need to configure all conditions within the same filter.
To add another filter condition:
Open the existing filter in the filters pane
Scroll to the bottom of the filter and click on the “ADD FILTER CONDITION” option.
You can define the additional condition(s) to include in the filter. You can choose from the list of fields to add to the condition.
This ensures the visual displays data that matches at least one specified condition.
Filters for Strings
QuickSight offers multiple filter types for string fields, providing flexibility to customise how data is filtered in your reports. String (text) fields have multiple filter types, selectable from the “Filter Type” dropdown:
Filter List
Description: This option lets you select specific values to filter from the existing values in the field.
Filter Condition: Choose whether the selection is included or excluded from the report.
Custom Filter List
Description: Enables typing specific values to filter on, even if they do not already exist in the field.
Filter Condition: Choose to include or exclude the specified values.
Null Options: Configure to include, exclude, or only include null values.
💡Tip: For filtering out nulls, set Filter Condition to "Exclude," leave the list blank, and set Null Options to "Exclude nulls."
Custom Filter
Description: Filters based on input text.
Filter Condition: Check if the text equals or is contained within the field’s values.
Null Options: Configure to include, exclude, or only include null values.
Use Parameters: Set the filter to dynamically use a parameter instead of static input.
Top and Bottom Filter
Description: Filters the top or bottom X values based on an aggregation.
Options:
Top/Bottom: Choose whether to filter the top or bottom values.
Integer: Specify the number of values (X) to filter.
Select Field: Choose which field determines the top/bottom X values.
Aggregation: Select how the field is aggregated (e.g., sum, average).
Add Tie Breaker: Include additional fields to resolve ties in the ranking.
Example:
Field = "Pay Date"
Top/Bottom = "Top"
Integer = 3
Select Field = "Margin"
Aggregation = "Sum"
This example filters Pay Dates to show the 3 dates with the highest total Margin.
Nested Filter
Description: Filters the main field based on criteria from another field.
Options:
Qualifying Condition: Choose to include or exclude values that meet the nested filter’s criteria.
Nested Field: Select the field that determines the main filter’s values. The filter options are the same as those available when creating a filter directly for the field.
Example:
Field = "Employee Number"
Qualifying Condition = "Include"
Nested Field = "Tax Year"
Nested Filter Type = "Filter List"
Nested Filter Condition = "Include"
Search Values = "2023"
This example filters Employee Numbers to include only those with payslips in the 2023 Tax Year, while still showing their data from other years.
Filters for Numbers
Numerical fields can be filtered as either dimensions or measures, depending on your analysis needs.
Converting Between Dimension and Measure:
To switch a numerical field between dimension and measure:
Click the three dots next to the field in the Data pane.
Select “Convert to dimension” or “Convert to measure”.
Filtering Dimensions:
Dimensions are filtered in the same way as string fields. For details, refer to Filters for Strings.
Filtering Measures:
Measures offer additional options for filtering:
Aggregation:
Choose how the field is aggregated for filtering.
No Aggregation: Filters based on exact values in the dataset.
Aggregated: Filters based on the selected aggregation (e.g., Sum, Average, Count).
Filter Condition:
Specify how the numerical values are compared for filtering (e.g., greater than, less than, equal to).
Use Parameters:
Replace static input with a parameter to dynamically compare field values.
Enter a Value:
Manually enter the value(s) to compare the field against.
Null Options:
Decide whether to include, exclude, or only include null values.
Example
Field: “Margin”
Aggregation: "Sum"
Filter Condition: "Greater than"
Enter a Value: "100"
Null Options: "Include nulls"
Result: This filter will pull only entries where the sum of Margin (grouped by the report structure) exceeds 100, while also including null values.
Filters for Dates:
Date fields offer multiple filtering options, which can be customized through the Filter type dropdown menu to suit your specific needs.
Date & Time Range
Filter the date field within a specified range.
Condition: Filter based on conditions like: Between two dates, Before/After a given date, and Equal to a specific date.
Use Parameters: Dynamically filter the report using a parameter instead of manually entered date(s).
Time Granularity: Filter dates with time components down to the second.
Start Date/End Date/Date: You can input a date(s) to filter the date field against.
Include Start/End Date: Option to say whether to include the selected boundary dates in the filter.
Exclude Last: If the condition is After, exclude any dates that occur between the current date and whatever period is set previous to that.
Null Options: Choose to include, exclude, or exclusively show null date values.
Rolling Date: Filter using relative dates instead of fixed dates (e.g., Today, Yesterday, or a custom relative date).
Filter Condition: Set the start or end date of the relative period.
Range: Define how far the period is from the current date (e.g., previous, next).
Period: Specify the unit (e.g., Days, Weeks).
Example:
Filter Condition: "Start of"
Range: "Previous"
Period: "Weeks"
Result: Filters data to include the first day of the previous week (Sunday by default).
Relative Dates
This allows you to filter dates relative to today or another date.
Time Granularity: Filter with precision if the date field includes time (e.g., to the second).
Period: Define the time unit (e.g., Days, Weeks).
Range: Set the type and number of periods for filtering.
Number of Periods: Specify how many periods to include. It has options for Last/Next N filters
Use Parameters: Dynamically set the number of periods via a parameter.
Set Dates Relative To: Filter relative dates from the current date or a parameter-defined date.
Exclude Last: When "Set relative dates to" is set to "Current date time", you can exclude dates that fall within the period between the current date and the specified previous period.
Top and Bottom Filter
Filter the top X date values based on aggregation. Functions the same way as in Filters for Strings.
Adding Controls
Filters can be adjusted while working in the Analysis view, but when the analysis is published to a dashboard, the Filters pane is hidden. Having a hidden Filters pane is useful for ensuring filters remain fixed, but there are scenarios where you may want dashboard viewers to adjust filters dynamically.
To allow filters to be adjustable within a dashboard, you need to add a control for the filter:
Steps to Add a Filter Control
In the Filters pane, locate the filter you want to make adjustable.
Click the three dots next to the filter and select “Add control”.
Then choose where to place the control:
Top of this sheet: Adds the control at the top, beneath the sheet header.
Inside this sheet: Adds the control as a resizable, separate box within the sheet, similar to a visual.
Filters and controls together make dashboards not only insightful but also highly interactive and customisable.
I hope you enjoyed this article and find it useful. If you have further questions, please reach out to our support team 😊