Wide to long

There is a matching Excel file that you can use to follow along and practice, which you can download from here.

Convert wide to long

use worksheet called "reshaper1"

Tableau reshaper

Use worksheet called "reshaper2"

Tableau Reshaper is an add-in for Excel. Download and find installation directions here. It was designed with the idea that it would be used to prep data for Tableau, but you don't need to have Tableau to use it.

This is data from one of the health insurance exchanges set up under the Affordable Care Act. Each row is an insurance product offered in a particular rating area (geographic area). The premium costs are listed by age, going across the columns (age 0-20, 21, 22, 23, etc)

To analyze this data – and present it in a visualization – I needed each age to have its own row. So instead of one row for each insurance product in a rating area, we’ll end up with 45 (there are 45 age groups in this data)

First, a little prep work to make this work the best.

  • Make sure the headers that are on your columns (in this case, the ages) are presented EXACTLY as you want them to appear in the final data.

  • Make sure that the columns you want to convert are all on the right side of your spreadsheet and the columns that you want attached to each row are all on the left side.

To reshape, put your cursor on the first data point – in this case F2 – and push the “Reshape Data” button under the Tableau ribbon.

It will push the data out to a new worksheet.

Note: If the new data file exceeds 1 million rows, this will automatically export your results as a .CSV file