Dealing with data when columns contain values and not distinct fields
In this section, we are going to create a columns-to-rows pivot. Thinking back to the columnar data source, Tableau performs best when every column is a field and each row is a record. Sometimes, we are presented with input data sources that are not structured that way. Financial information, often in spreadsheets, is organized in a format like that shown in Figure 4.24. This data contains monthly sales targets for each country. This is the data that can be found in the Sales Targets.xlsx
file:
Figure 4.24 – Sales targets in Excel
Looking at the data in this file, we see the Country
field in column A. The range of row 1, B1:M1, represents a Date
field. The range from B2:M6 represents the Sales targets
field. As you can see, this is not the columnar format that Tableau likes.
Now, we will begin the exercise of pivoting this data into a columnar format:
- From the connections...