This blog will teach you tableau parameter actions and help you learn to integrate a dynamically changeable graph axis in your dashboard.
Step 1: Setting up a parameter for the parameter actions
To start off with, create the parameter that you will be using for your graph’s axis.
If you would like further information on making parameters, there’s a great guide from Tableau’s help page:

Now fill it out based on your specifications. For this example, I am using a shopping list database that includes values for meals and ingredients.

Step 2: Creating a calculated field for the axis
Next, create a calculated field that will serve as the mechanism for changing the axis based on the parameter changing.
There’s also a great tutorial from Tableau on calculated fields:

This calculated field will be a simple CASE statement (or IF statement if you prefer that) which checks for a change to the parameter and returns the desired table based on which value is chosen (For example, if “Meal” is chosen then the axis will display the Meal table).

Step 3: Constructing the Graph
Now it is time to construct the graph, drag the calculated field to one of the axes of your graph and a shared table to the other. (In this case I used Price as both Meal and Ingredients shared this table)

Step 4: Changing the parameter
You can show the parameter on the right side of tableau by right clicking on the parameter in the tables section and clicking “show parameter.”

You should now be able to change the parameter to your different options and the graph should change as well.
Step 5: Further uses
An example of how you can integrate this into your dashboard is by using other graphs to change the parameter (In this case, I am using a database on traffic crash statistics).

This allows the user to change the graph to show the trend over the years for each of the six tables above. This reduces space on the graph by not needing six different line graphs since, in this case, the user does not need to compare between the six graphs. This also makes the dashboard a bit more interacting and engaging for the user.
Step 6: Creating the parameter actions
Your first step is to make another graph. For my example above, it is simply text displaying the sum of its respective field. What you must include, though, is the name of your parameter as a detail of the graph. (In my case it is the blue section “Crash”)

After you have done this for each of the options in your parameter, you can now make the actions that will change your original graph. You can find the actions section of tableau by clicking Ctrl + Shift + A. You can also find Actions by hovering over “Worksheet” and clicking “Actions” at the top of your screen.

In this section, click “Add Action”, and then click “Change Parameter”.

For the source sheet, you will want to choose the dashboard that has the graphs you will be clicking/changing. Then tick the graph that will want to be clicking to change your parameter (i.e., total crashes in my case). Also make sure the “run action on” is on “select”.

For the “Target Parameter,” chose the parameter you made for this example. You can also choose to set the default value (What the parameter will return to when you click away from the graph) or keep it as the current value like I have it currently.

Finally, for the “Source Field”, there should be the name of the detail you added to the graph.

You will need to repeat this for each graph of your parameter, but once that is complete you are ready to show off your amazing, interactive dashboard with tableau parameter actions.
Thank you for reading, I hope you found this helpful.