Is it possible to filter control values using hidden parameter?

I know that it is possible to filter control values by “showing relevant values only”, but as far as I can tell this only allows you to filter using another visible control. I have some visualizations where I am automatically applying some filters to restrict the data to a subset. I would also like the controls to be restricted to this subset; right now, irrelevant values that can’t show up in the visualization are showing up in the control. Any suggestions?

The only thing I can think of would be to add some RLS. However, that would limit the whole dataset and not give you the ability to change it.

You might also look to use parameters and custom sql and a direct query. However, that has limitations (direct query) as well as you would need to refresh the controls every time to pull in the updated data.

I don’t think that would work for the use case I have in mind. Here’s a toy example to make it a bit more clear:

Imagine I have a pet adoption database that contains both dogs and cats. My dashboard contains a table that shows only information related to dogs. And I want people to be able to filter the table by breed. I can set up a “breed” parameter and control for filtering, but I can’t restrict the values in the control to dog breeds only because the limiting to relevant values only works with other controls. I don’t want to exclude cats from the entire dataset (they are relevant to other visualizations), I just want to remove them from a particular control.

Make sense? This feels like a fairly common situation. Maybe a good feature request?

yeah it makes sense. I’ll mark it as a feature request.

A workaround may be to show values in a table and use Actions to set parameters or filter other visuals. You could apply any filter on this table (so would be able to show only dogs for a particular breed that may be selected via a control).
You may also explore having cascading filters… so for example the top visual has animal kinds (dog, cats etc). Upon selecting an animal, you move to the second visual (could also be in another tab) that shows breeds … and upon selecting a breed you move to the third visual that shows the animal types (cocker spaniel, poodle etc). Upon selecting this, you get stats related to you choices. The point of this “journey” is that at each step you are only presented with the choices relevant to the previous choices. (I have used this approach to “drill-down” in a sports dataset starting from League->Event->Team->Player… and it works very well).

There is also a way to select/deselect multiple items in a table. This could come in useful if you were looking into filtering a control for multi-valued parameters.

1 Like

Huh, very interesting. I will take a look at those features. Thanks!

1 Like