Different Uses of Parameters: Tips from WorkoutWednesday

by Laura Scavino

Parameters can be used for different purposes on Tableau and they can help customising the view with few tricks. Interested in 3 of the many uses in Parameter? Read the three types of parameters that I used for Workout Wednesday challenge week number 33 and 43.

 

Use 1 

Parameters as List of values for Dates

Use a parameter for dynamically select a date in the view by adding the date from the field. You can also customise your date value from the parameter, without doing complicated calculations. Just click on display format and select the desired outcome. It is a very quick way also to use the parameter in tool-tips and titles.

 

Use 2 

Parameter as a range of values in a Window Calculation 

Use the Parameter to show the week numbers with  range of integer values, select a minimum and maximum value.

 Use the parameter in the calculation in order to have a window view breakdown looking back at the specific interval selected.

WINDOW_SUM(SUM([items sold per week]), -[Smoothing (Weeks)], 0)

 

Use 3

Parameter to edit the axis title

Use the parameter created with the range to also dynamically change the axis title in accordance to the parameter selected. In order to do that, I have created a very long CASE statement calculated field, where each of the parameter value have a string correspondent. Bring the value to the rows and then rotate the label to have a more realistic axis view. Every time the parameter changes, also the title will change. When there is a string parameter with a measure value correspondent, the calculated field would be even easier.

For instance:

CASE [Parameter]  When ‘Profit’ Then [Profit] When ‘Sales’ Then [Sales]

In this case instead, I had a range of values, which I had to carefully match with the parameter value view to be shown in the Axis title.

 

I hope you find useful this little piece of advice!