Adding User-Interactivity to AWS QuickSight Dashboards

This article is a part2 of the AWS QuickSight series. In part1 we have discussed various aspects of QuickSight but something was missing, isn’t it?

Yes, User Interactivity!

Let’s say, I as a user want to view population data only between 2015–2017?

Image for post
Image for post
Discovering Barcelona Analysis Dashboard

or I would like to view accidents data for the first half of the year (January to June) or the second half?

Image for post
Image for post
Accidents by month in Barcelona

Or you want to specifically choose months?

With the current dashboards, doing that is not possible, that is when filter comes into action.

Filter

A filter allows you to remove unwanted data in a field provided with a condition. It will only allow that data which satisfies the condition or vice versa.

You could add one or more filters to a visual, or create a filter and apply it to all visuals or maybe specifically choose certain visuals; it all depends on the use-case. I recommend exercising all the above options to better understand them.

Filters are applicable at a dataset level. So, any visual using that dataset will be affected.

Let’s create a filter for the Population by Year visual to the year field.

Image for post
Image for post
Select visual & open filter

This will open the Applied filters window for selected visual. It shows the list of all filters applied for that visual.

Let’s add a filter and choose the Year field.

Image for post
Image for post
Adding a filter for year field

You would see different settings under it, like Filter type, Use parameters, Exclude nulls, etc. For each filter type, the settings would change accordingly, I recommend you to exercise all options and choose your best fit.

Image for post
Image for post
Edit filter properties

In the above example, the year is a field of type date. So, the range is the best fit for it. We shall set a range for the date, in the above case (2012 — 2015) using Start date and End date fields in the Edit filter settings window.

Image for post
Image for post
Apply filter properties

Once filter properties are applied, only the data that is in the given range is visualized. This can be seen in the above image.

Filters can be of different forms based on the datatype of the field chosen. For instance, in the case of date datatype, it is a range, it might be different for a string or number.

Scope of a filter

We could choose to apply a filter to all visuals or specifically choose certain visuals.

Image for post
Image for post
Setting the scope of a filter

A parameter with a Control

Usually, a dashboard user would want to change the date range. We could use a parameter to make that happen.

A parameter is more like a variable that stores some value & is passed to a filter/function.

To allow a user to modify/scale this parameter we use a control.

Parameter and Control go hand in hand. They together make user interactivity in Quicksight dashboards a reality.

Let us look into what parameter actually is.

Image for post
Image for post
Add new parameter
Image for post
Image for post
create a new parameter

This will create a parameter. Parameters can have a static default value which you could manually enter or a dynamic value. The dynamic default value is taken from the dataset. We have to specify the column name for it to choose.

I followed the above process and created an EndDate parameter as well. This way time interval for visual could be set using StartDate & EndDate.

We have successfully created parameters let’s add controls to these parameters.

Image for post
Image for post
Add a control
Image for post
Image for post
Adding control

I recommend keeping both the names of control and parameter the same as it would be less confusing. We would be provided with multiple style options for each control based on the datatype of the parameter.

Image for post
Image for post
Use control to modify

Using parameters in a filter

Image for post
Image for post
Use parameters
Image for post
Image for post
Select parameter
Image for post
Image for post
Use parameters in the filter
Image for post
Image for post
After using parameter

Let’s try changing the time interval using EndDate control and see how it impacts the visual.

Image for post
Image for post
2013–2015 population in Barcelona

We have successfully added user-interactivity to our dashboard. By following the same process, I shall create other controls and parameters which can be used to filter the values for other visuals.

For the following visual, I want to select District names using a control.

Image for post
Image for post
Custom filter

I have created a filter for Accidents per District visual to the District Name field. As discussed earlier Filter type defines the conditions of a filter. I would recommend you to choose the Custom filter for string, number, other datatypes as it gives you the option to not only use parameters but also lets you set checkbox style for selecting multiple values in control.

Image for post
Image for post
Image for post
Image for post

Let’s create a parameter with control and use the parameter in the filter we created earlier.

Image for post
Image for post

Once the parameter is created let’s add control to it. As discussed earlier, for multiple values — the style of the control is a multi-select drop down, which is just a drop down of checkboxes to select multiple values or none.

The values displayed in this drop-down list can be specified or linked directly from a dataset field as shown in the below image.

Image for post
Image for post

Once this control is added, by default all the values in the control drop-down are selected.

Image for post
Image for post

Add this parameter and control to our filter.

Image for post
Image for post

Apply the settings.

Image for post
Image for post

We could see no data as all values are un-selected in the DistrictName control.

Now, let us select the District names and see how it impacts the visual.

Image for post
Image for post

Thanks for the read, if any queries, please leave them in the comment section.

This story is authored by Koushik. He is a software engineer and a keen data science and machine learning enthusiast.

ZenOf.AI

AI | Machine Learning | Big Data

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store