Dynamic Parameter in Tableau
Hello friends!! We’ll be learning how to create the dynamic parameter range in Tableau.
Lets say you want to show Top N values in any visualization and if you are using parameter to achieve that then you have to put a limit of minimum and maximum value manually. We’ll achieve that dynamically using calculated field.
Let’s see we want to see Top states by sales, we’ll create the following calculated field as State Count
State Count If [State]="California" THEN 1 ELSE {FIXED :COUNTD([State])} END
Create parameter
Right click on the Parameters section and click on Create Parameter
Adding the calculated field for dynamic range
Give any name to the parameter, select Integer in data type and range from the allowable values. Then click on the Set from Field and select the calculated field we created and done.
It will take minimum value to maximum value based on the calculated field. In this case it will be 1 to 49.
Keep visiting Analytics Tuts for more tutorials.
Thanks for reading! Comment your suggestions and queries