I am building a dashboard where I want the user to select a "Category Type" from a Parameter, and then have a secondary Filter only show relevant values for that specific selection. For example, if they select 'Furniture' in the parameter, the 'Sub-Category' filter should only display chairs and tables, not office supplies. I’ve tried using 'Only Relevant Values,' but that only seems to work between two filters, not between a Parameter and a Filter. Is there a specific Calculated Field logic I need to apply to the filter shelf to make this interaction seamless?
3 answers
To achieve this, you need to create a Calculated Field that acts as a bridge between your Parameter and the Dimension. The formula should look something like: [Category] = [Category Parameter]. Drag this calculation to the Filter shelf and set it to 'True'. Now, when the user changes the Parameter, the sheet will only include data where the dimension matches. To make the Filter list itself dynamic, you must then set the Sub-Category filter to 'All Values in Context' or 'Only Relevant Values'. This forces Tableau to evaluate the Parameter-based calculation first, effectively pruning the list of available items in your dropdown filter.
If I have multiple parameters affecting the same filter, will this "True/False" calculation method still work, or will I run into performance issues with a large dataset on Tableau Server?
Another neat trick is using "Parameter Actions." You can set it up so that clicking an element on one sheet updates the parameter, which in turn filters the rest of your dashboard dynamically.
I agree with Deborah. Parameter Actions added a lot of interactivity to my last project. It feels much more intuitive for executives to click a chart segment than to fiddle with a dropdown menu on the side of the dashboard.
Steven, the performance impact is usually negligible if you are using Boolean (True/False) calculations, as they are very fast for Tableau to process. However, if you are nesting multiple parameters, you should consolidate them into a single CASE statement within your calculation. This makes the logic easier to maintain and ensures that Tableau’s query optimizer can handle the filter efficiently. On Tableau Server, just make sure your "Include" or "Exclude" logic is consistent across all worksheets to leverage the cache properly.