Simulate Auto-Selection Filter

Hi QuickSight Experts,

I’m seeking your guidance on setting up a simulated auto-selection filter behavior in QuickSight dashboard.


:bar_chart: Dataset Structure

My dataset includes the following fields:

CaseKey | City | Population | State
-----------------------------------
1       | C1   | 24         | Bihar
1       | C1   | 24         | Bihar
1       | C1   | 24         | Bihar
2       | C1   | 24         | Bihar
3       | C2   | 20         | Bihar
4       | D1   | 30         | Orissa
4       | D1   | 30         | Orissa
5       | D1   | 30         | Orissa
6       | D2   | 35         | Orissa
7       | D3   | (null)     | Orissa
8       | D4   | (null)     | Orissa

:puzzle_piece: Dashboard Setup

I have two single-select dropdown filters:

  • State
  • City

And two KPI visuals:

  1. City Average Population – connected to the City filter
avgOver(Population, [City], PRE_FILTER)
  1. State Average Population – connected to the State filter
avg(Population, [City, State])

:white_check_mark: Requirement

When a user selects a City (e.g., C1) from the City filter, I want the State filter to automatically update to the corresponding state (e.g., Bihar), so that:

  • The City KPI reflects the selected city
  • The State KPI automatically shows the related state, without requiring a second manual selection.

:free_button: Open to Alternatives

I’m open to removing the State filter completely, as long as the State Average KPI updates automatically based on the selected City.

:folded_hands: Help Needed

@Deep @duncan @Giridhar.Prabhu @ytakahr @Brett @Xclipse

Thank you in advance for your help!

Hi @Purushothaman, you can implement behavior like this using Table visuals and parameters instead of standard Filter visuals.

For example you can create 2 Table visuals, City_vis and State_vis and 2 string parameters CityParam and StateParam. City_vis should have 2 columns with City and State, but State should be hidden.

Then use navigation Navigation actions to set/reset values:
in City_vis: CityParam=City and StateParam=State.
in State_vis: StateParam=State and CityParam=‘’ or whatever you want.

It’s easy for single select, but if you want to use multiselect you have to use more columns and calculated fields of average complexity to store several values in these 2 parameters. And don’t forget to highlight selected row[s] to make it user friendly. Just in case, all this staff related to selecting many rows in a table was discussed in the community several times.

Hello @Purushothaman ,

Just wondering what is the significance of having single select filter in your user case?

if you can have multi select value option and the use cascading filter with show relevant values only, it would be straight forward no?

For reference just in case -

Cheers,
Deep

Hi @Deep

Thanks for your suggestion!

You’re right that cascading filters with “Show relevant values only” can help narrow down options. However, the main limitation of cascading filters is that they still require manual selection in filter.

:puzzle_piece: My Use Case:

  • I have two KPI visuals: one based on City, the other based on State
  • When a City is selected, I want the corresponding State to be automatically selected—without requiring the user to pick it manually

:white_check_mark: Why Single-Select?

  • I’m using single-select to keep things clean and focused for the user, since each KPI should reflect only one City or one State at a time
  • It also simplifies parameter logic and avoids confusion in the visuals.

Appreciate your input—happy to hear if you’ve seen this solved in a different way!

Thank you!

@Purushothaman ,

Ok i got that .. thanx for explaining.
If you keep the city cascade to state, the state will be anyway pre-populated anyway no?
Also there might be a situation here same city name can be found in more than one state just a thought.

If users are specific to state, the RLS can also be applied, just thinking out loud :).

Cheers for the exploration.

Regards,
Deep

Hi @Purushothaman, thanks for tagging me to your post. Apologies for the delayed response as I was on leave for a week.

  • A state can have multiple child cities, but a city always has one parent state.
  • There are no cities with the same code (e.g. C1, C2) across different state.

If both of the above assumptions are true (please pardon my ignorance on Indian cities), the city filter alone can uniquely identify the parent state. So why not simply apply the same city filter to both two visuals and have only one control for city, since you are open to removing the state filter completely?

Then, if you want to show the parent state for the user selected city, you can be creative with calculated fields and table visual to display just that, like in the following example.

Let me know if this is what you want. If yes, I’m happy to provide more details.

1 Like