KNOWLEDGE BASE

Selecting a Set Using a Parameter


Published: 14 Jan 2014
Last Modified Date: 18 Oct 2022

Question

How to use a parameter to select which set is visible.

Environment

Tableau Desktop

Answer

  1. Create the desired sets within the workbook.
  2. Create a new string parameter with one value for each set to be selected.
  3. Create a new calculated field named "Set Selector" with the following formula:
    CASE [Parameter]
    WHEN "Value 1" THEN INT([Set 1])
    WHEN "Value 2" THEN INT([Set 2])
    END
  4. Right-click the Set Selector field in the Measures pane, and select Convert to Dimension.
  5. Drag the Set Selector field to the Filters shelf, and configure the filter to show only "1".

     

Did this article resolve the issue?