Pivoting columns to rows using wildcards
If your data is subject to changes over time, particularly the introduction of new columns, your flow may not produce the output expected or even produce an error. When scheduling a flow for recurring execution, it is important that you can rely on its execution being successful. One of the ways in which the Pivot function can achieve this goal is by using wildcards. Wildcards can be used to identify columns that need to be pivoted, based on a header pattern, rather than an exact match. In this recipe, we'll pivot columns to rows using wildcards.
Getting ready
To follow along with this recipe, download the Sample Files 6.2 folder from this book's GitHub repository.
How to do it…
Start by opening the SalesData.csv file from the Sample Files 6.2 folder in Tableau Prep, then follow these steps to pivot columns to rows using wildcards:
- Add a Clean step to your flow, then expand the bottom pane to observe the...