Search code examples
filtertableau-api

Create Tableau filter that adjusts another filter


I have two fields: a destination location and an origin location. I am trying to add functionality so that I have 2 filters, one with a list of locations and another specifying if the previous filter is for destinations or origins. I've created a parameter that switches between destination and origin. I'd like to connect that to the location filter so when the parameter is specified as origin, the location filter draws from the origin field.


Solution

  • You may need an additional calculation field (List Value) like the following:

    if [Switch] = 'Category' then [Category]
    else [Sub-Category]
    end
    

    Then you just need to show your parameter (switch), and add a filter based on that CF (List Value).

    You should be getting something like this:

    enter image description here