0

I have a list of survey results that looks similar to the following:

| Email             | Question 1 | Question 2 |
| ----------------- | ---------- | ---------- |
| test@example.com  | Always     | Sometimes  |
| test2@example.com | Always     | Always     |
| test3@example.com | Sometimes  | Never      |

Question 1 and Question 2 (and a few others) have the same discrete set of values (from a dropdown list on the survey).

I want to show the data in the following format in Tableau (a table is fine, but a heatmap or highlight table would be best):

|            | Always | Sometimes | Never |
| ---------- | ------ | --------- | ----- |
| Question 1 |   2    |     1     |   0   |
| Question 2 |   1    |     1     |   1   |

How can I achieve this? I've tried various combinations of rows and columns and I just can't seem to get close to this layout. Do I need to use a calculated value?

Alex Tennant
  • 356
  • 3
  • 9

1 Answers1

0

As far as I know - it is not natively possible with Tableau, because what you have is kind of a pivot table. What you can do is unpivot the whole table as explained here https://stackoverflow.com/a/20543651/5130012, then you can load the data into Tableau and create the table you want.

I did some dummy data and tried it. That's my "unpivoted" table:

Row,Column,Value
test,q1,always
test,q2,sometimes
test1,q1,sometimes
test1,q2,never
test10,q1,always
test10,q2,always
test11,q1,sometimes
test11,q2,never

And that's how it looks in Tableau:

enter image description here

Alexander
  • 1,969
  • 19
  • 29