Swap Dimensions or Measures with Parameters in Tableau
Using a parameter to switch between dimensions or measures allows users to view different perspectives of the data within a single dashboard, this enables more flexible and personalized analysis based on their specific needs.
Let’s get started with making parameter, go to the data pane and click on its dropdown and then select ‘create parameter’.

Once you click on ‘Create Parameter’, a window will appears on the screen and then we have to enter the details in it, Here’s what i have added:

Once you click OK, it will appear on the lower-left side. Click on it and select the ‘Show Parameter’ option. It will then be visible on the right side of your view, but it won’t work until you create a calculated field and link it to the parameter.

Click on ‘Create Calculated Field’ from your data pane to create a new field, write its name (Select Measure) and the following logic;

Put the created calculated field (Select Measure) into the row and sub-category into the column and into the colors. And at this time whichever measure name you select from your parameter’s dropdown the view will automatically change.

Here is the final result:

Note: The same steps can be applied to swap dimensions using a parameter.
Keep Learning!
Stay connected with my blog.