Wide and tall in Tableau

You can easily see the difference between wide and tall data in Tableau. Here is what the wide table of data looks like in the left data window:

As we'd expect, Tableau treats each column in the table as a separate field. The wide structure of the data works against us. We end up with a separate measure for each year. If you wanted to plot a line graph of population per year, you will likely struggle. What dimension represents the date? What single measure can you use for population?

This isn't to say that you can't use wide data in Tableau. For example, you might use Measure Names/Measure Values to plot all of the Year measures in a single view, like this:

You'll notice that every year field has been placed in the Measure Values shelf. The good news is that you can create visualizations from poorly structured data. The bad news is that views are often more difficult to create and certain advanced features may not be available. This may occur in the preceding view due to the following reasons:

  • Because Tableau doesn't have a date dimension or integer, you cannot use forecasting
  • Because Tableau doesn't have a date or continuous field on Columns, you cannot enable trend lines
  • Because each measure is a separate field, you cannot use quick table calculations (such as running total, percent difference, and others)
  • Determining things such as average population across years will require a tedious custom calculation instead of simply changing the aggregation of a measure
  • You don't have an axis for the date (just a bunch of headers for the measure names), so you won't be able to add reference lines

In contrast, the tall data looks like this in the data pane:

This data source is much easier to work with. There's only one measure (Population) and a Year dimension to slice the measure. If you want a line chart of population by year, you can simply drag and drop the Population and Year fields into Columns and Rows. Forecasting, trend lines, clustering, averages, standard deviations, and other advanced features will all work as you have come to expect them to.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.79.176