How to pass Parameter Value and Level from 1 filter to another filter

I need to display different charts and tables having a common Multi-Level Hierarchy Filter on a dashboard. For the purpose, I have been using Layers so that when the user wants to see a particular visualization, they can just click on a button and the layers will switch displaying the requisite visualization on the same dashboard.

But, now I need to use 2 separate scripts on the Parameter Value changed action of this Multi-Level Hierarchy Filter.

So, I was thinking of creating 2 separate filters (Filter1 & Filter2) on separate layers for the same Multi-Level Hierarchy. And when the user clicks on the Visualization Change Button, the Layers switch and the Value (as well as the Level) selected by the user on Filter1 is passed to the Filter2 so that the user sees 2nd visualization for the same selected values.

Is there a script or another way to pass the Value (and the Level info) to be passed from one filter to another?

You don’t need two filters for this. You can put the filter on a third layer, that will be always visible. In this layer you can put everything that is common to the two other layers.

Yes one filter (Ring) to rule them all.

When you make the One filter you can select the value from all metric sets that have that common value you are making the filter for. I suggest naming all your metric sets to something descriptive instead of having MetricSet_1 and so one, also same thing with the View Parameters, the default names are just 1, 2,3 and so one this does not help you know what the filters are for.

Once you get the names all changed this will help you pick all the right values from each Visualization for each filter.

You do not have to create a 3rd layer, if you already have the filters on each layer they can just both point to the same thing. but I do suggest you take them off to a third layer and but a button that open a filter layer. Not only does this save display space but it makes it easier to maintain.

Yes @james.davis, a filter to rule them all :slight_smile:. However, you don’t need a button to show a layer with the filters, the filters can be always visible on a “main” layer and the button you have to hide/show the other layers with the different visualizations.

@luis.silva correct you can have the filter always showing. I was just saying you can reclaim that space to use it for visualizations if you wanted to. I have also seen where it collapses to a smaller area, say yo have 6 filters but only 3 main ones, so you always show the main three and then you can expand the area to all 6 then collapse it back.

@james.davis your are right. I was just responding to the specific case appointed by @ravi.bansal.

Thank you everyone for chiming in with their suggestions. I am sorry for not being more clear about my conundrum.
My Dashboard has 7 layers and I have the Filter on a separate layer so that it is always visible. I have 2 separate scripts which both run on the Parameter Value change action of the Filter. One of those scripts again hides and shows sub-layers depending on the level of the value selected in the filter. I was under the impression that if I merge the 2 scripts and apply it to Parameter Value change action of the filter, it will interfere with the functioning of the Dashboard.

But, thankfully, it has worked fine and the Dashboard is working properly.

Nevertheless, I would still like to know (for knowledge & future purpose) if there is a way to pass value and level from 1 filter to another filter based on the same multi-level hierarchy.

The filter action can always pass values from 1 view parameter to another. When setting it up make sure you select the 2 view parameters instead of the default, which is whatever was clicked.

Since they’re the same hierarchy (in your example) it’s very trivial to do and would be done with this interaction.

1 Like