Restrict list of values in control dropdown using parameter

I use an embedded dashboard to show (e.g.) the value of sales by product for a given company. The company is set using a parameter when invoking the dashboard, so I don’t want a list of companies showing anywhere on the dashboard

I have a control with a dropdown of products. The products should be limited to those of the company specified by the parameter, which is where I’m struggling. Can anyone help me work out how to do this?

RLS is not a solution because a user should be able to switch between companies - but this happens outside of the dashboard using the parameter

See my example at ExampleFilterControlValuesUsingParameter

Hi @ryendall -

A bit hacky but the only way I can think of doing this if using Free Form Layout + Relevant Values for the parameters and hiding the “Company” control under something.

restrict-list-of-values-in-control-dropdown-using-parameter/40576

2 Likes

Hi @robdhondt,

Do you think there’s a technical reason why we can’t show relevant values based on a filter which isn’t added as a control or added to the sheet? This is an issue that I face very often. I’m forced to put filters on the sheet just so that I can display relevant values based on them.

@David_Wong , I think for this use case we can use the nested filter feature added last year.

Check this out if this meets the requirement.

Hi @prantika_sinha,

I don’t think nested filters work for this use case.

Using @robdhondt’s sample dataset:

The goal is to display a filter control that only shows company A’s products. The list of products could be dynamic and long (e.g., hundreds of products), so we don’t want to use the “specific values” option for the control.

Basically we want to show relevant values in the “product” control based on the “customer” filter but that only works if the “customer” filter is on the sheet or added as a control. The issue is that we don’t want users to see the “customer” filter.

If I use a nested filter and add it to the top, I get a control for “company” but I want a control for “product”.

Another common use case is when I want a control to only show a subset of all values. For example, I only want to see data for companies A and B.

By default, the filter control shows all values with A and B selected.

If I want my filter control to only show A and B, I have to add two filters for the “company” field - one containing my qualifying condition and a second one containing all values. I then need to add a control for the second one and show relevant values based on the first one. Again, this only works if the first filter is added to the sheet or as a control

Do you think there’s a technical reason why we can’t show relevant values based on a filter which isn’t added as a control or added to the sheet? This is an issue that I face very often. I’m forced to put filters on the sheet just so that I can display relevant values based on them.

@David_Wong - Good Question. I thought of a bunch of different ways to answer this. There are many technical reasons.

But don’t think of this purely from a technical perspective, but rather as a relationship model or a UX design consideration. In QuickSight, filters applied to a visual or analysis don’t have explicit names—they’re essentially just conditions that contribute to the SQL query. If you were to try and reference one of these filters to define relevant values, it would be messy to display in the UI, especially when there are multiple filters applied to the same dataset.

On the other hand, controls are explicitly defined and named elements in the UX. They not only provide a clear label to reference when setting up cascading logic but also inherently support a structured parent-child relationship. This makes it much easier for users to understand and manage dependencies between selections in different controls.

You can see the high level limitations behind the technical implementation within the public doc below. A lot of those have to do with how the distinct values are filtered etc (sets, etc).

  1. (Optional) You can limit the values displayed in the control, so they only show values that are valid for what is selected in other controls. This is called a cascading control.When creating cascading controls, the following limitations apply:
  • Cascading controls must be tied to dataset columns from the same dataset.
  • The child control must be a dropdown or list control.
  • For parameter controls, the child control must be linked to a dataset column.
    • For filter controls, the child control must be linked to a filter (instead of showing only
      specific values).

    • The parent control must be one of the following:

      • A string, integer, or numeric parameter control.
      • A string filter control (excluding top-bottom filters).
      • A non-aggregated numeric filter control.
      • A date filter control (excluding top-bottom filters).
1 Like