# Transforming Data Within Tableau

If you load a datatable with the following form into Tableau

 Country Name Series Name Year Value Afghanistan Birth rate, crude (per 1,000 people) 2011 [YR2011] 36.556 Afghanistan Birth rate, crude (per 1,000 people) 2012 [YR2012] 35.254 Afghanistan Death rate, crude (per 1,000 people) 2011 [YR2011] 8.375 Afghanistan Death rate, crude (per 1,000 people) 2012 [YR2012] 8.095 Albania Birth rate, crude (per 1,000 people) 2011 [YR2011] 12.651 Albania Birth rate, crude (per 1,000 people) 2012 [YR2012] 12.756 Albania Death rate, crude (per 1,000 people) 2011 [YR2011] 6.71 Albania Death rate, crude (per 1,000 people) 2012 [YR2012] 6.812 Algeria Birth rate, crude (per 1,000 people) 2011 [YR2011] 24.658 Algeria Birth rate, crude (per 1,000 people) 2012 [YR2012] 24.579 Algeria Death rate, crude (per 1,000 people) 2011 [YR2011] 5.855 Algeria Death rate, crude (per 1,000 people) 2012 [YR2012] 5.895

and you want to investigate the relationship between variables you must be prepared to transform the data within Tableau.

Karunaga Molubu has shown me two ways of doing this.

Using new calculated fields;

Create two calculated fields: Birth Rate and Death Rate that have the appropriate values. Using the new data values, create worksheets that show the relationship between variables:

– With New Fields – using the new calculated fields.

– Correlation – Showing the correlation between Birth and Death Rates.

Using a duplicate source;

Duplicate the data source  – Birth Rate and Death Rate

– From Birth Rate data source

– Drag Country and Year to Row shelf

– Put Series on filter and select Birth Rate ….

– Sum(values) to text shelf

– From Death rate data source;

– Blend on Country and Year

– Sum(values) to text shelf

– Put Series on filter and select Death Rate ….

He has made a simple workbook using the datatable above. You can download this workbook to your computer by clicking on its name  Forum_149684.twbx