Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (17.6k points)
edited by

I am new to Tableau (first day). I have the data below where D* refers to one of three variables that are all correlated against each other. There are 3 instances of each D* variable. When the same variables are against each other, I have put an NA.

I want to make a heatmap from this data where the correlation values (coefficients) are converted to colors. Step-by-step, what can I do to reformat or otherwise the data to achieve this?

If my question isn't framed clearly enough please let me know in the comments.

 D1  D1  D1  D2  D2  D2  D3  D3  D3

D1          

D1  

D1  

D2  0.3 0.3 0.3 

D2  0.4 0.2 -0.2    

D2  0.1 0.3 0.4     

D3  0.6 0.6 0.6 0.2 0.2 0.2 

D3  0.6 0.8 0.9 0.4 0.2 -0.2    

D3  0.7 0.7 0.7 0   0.2 0.2 

1 Answer

0 votes
by (47.2k points)

Step 1: You can create an Excel Spreadsheet with the table exactly as you provided above, but rename the different D* instances by adding a, b and c as required. Save the excel spreadsheet.

Step 2: Open Tableau and connect to the Excel file enter image description here

Step 3: Select columns D1a to D3c enter image description here

Step 4: You need to hover your mouse and click on the drop down arrow and select pivot enter image description here

enter image description here

Step 5: Now, Double click on F1, Pivot field names and Pivot field values and rename as appropriate. Note the slight variations in the names. enter image description here

Step 6: Change the data type for correlation coefficients. Click on Abc and change as shown. Click on Sheet 1 when you are done. enter image description here

Step 7: Now, Right click on Correlation Coefficients and click Convert to measure. enter image description here

Step 8: As shown in the image, drag the different D* fields to the row and column shelves Drag Correlation Coefficients onto the Color Marks card. enter image description here

Step 9: As shown in the image, Click on “Abc” at the top. Hover your mouse and click on the drop down arrow and Edit colors. enter image description here

Step 10: Choose the options shown below. Feel free to use this format if you wish. enter image description here

Step 11: Click on the end member green color and select the lighter green color as shown. Deselect “Use Full Color Range”. Click OK. enter image description hereenter image description here

Step 12: Format the Correlation Coefficients as shown. enter image description hereenter image description here

Step 13: You are done with building your Tableau visualization.enter image description here

Browse Categories

...