In prior releases, you had to manually dig through the flow and tediously change values used throughout or maintain duplicate flows. To run the flow for different data, run the flow again, then when prompted, enter the parameter value “2016.” Notice that the output step updates with the different data depending on the year chosen, and now you have generated two outputs: Superstore Sales from 2015.hyper and Superstore Sales from 2016.hyper. Select 2015 from the drop-down, then click “Set” to apply the parameter value and run the flow. When it’s time to run the flow, you will be prompted to choose a parameter value to run the flow with. It's as simple as clicking the parameters icon and choosing the parameter to apply. To keep track of the sales data included in the output, navigate to the Create ‘Superstore Sales.hyper’ output step and use the parameter to replace the end of your file name with the year of sale. When you save this filter, the data is dynamically filtered to only include sales data from the year the parameter is set to. Notice that the parameter value is highlighted in purple, whereas the field is shown in orange, just like in Tableau Desktop. To use the parameter to filter order data by year of sale, add a new filter that checks if the field is equal to your parameter value. To see all the places you can apply parameters in a flow, check out our Help documentation Apply Parameters to Your Flow. Add years 2015 through 2018 to the list, then select “Prompt for value at run time” to require anyone running the flow to choose a parameter value from the list.Īfter creating the “Year of Sale” parameter, you can apply this parameter to steps in your flow. This will allow whoever runs the flow to choose the parameter value from a preset list of years. Name the parameter “Year of Sale.” Then, set the data type to “Number (whole)” and select “List” as the allowed value type. Open the data set, then to create a new parameter, click the Parameter icon on the top menu, then click Create Parameter. In this example, we'll be using the Superstore sample data set. Dynamically filter sales data with Parameters Using parameters in this way empowers anyone to easily use your flows without having to understand the technicalities of the flow. In this post, I’ll be walking you through how to use parameters to dynamically filter sales data. Parameters give you the power to make your prep flows dynamic. Easily swap out input or output values that use the same schema when running or scheduling a flow, or use parameters in filters or calculated fields to edit values throughout your flow. release, parameters are global placeholder values that you can use to replace constant values in a flow. In Tableau Prep, you can use parameters to scale your flows to accommodate multiple use cases instead of managing duplicate flows! Introduced with the Tableau Prep 2021.4.1.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |