1 of 1 people found this helpful
It is challegeing to do it with Tableau alone, but it think that you can do it with R alone or with integration R with Tableau.
For example I used melt function in reshape library and code look like this:
and you get...
Product variable value
1 Hats Color1 Blue
2 Belts Color1 Green
3 Shirts Color1 Red
4 Pants Color1 Green
5 Hats Color2
6 Belts Color2 Blue
7 Shirts Color2 Blue
8 Pants Color2
9 Hats Color3
10 Belts Color3
11 Shirts Color3 Green
12 Pants Color3 Blue
You can cut out second column and if you want delete NA values.
I would be glad if anyone has another answer.
I'd reshape the data. I know R and use it almost everyday but have not had the opportunity yet to explore the integration with Tableau. I can't comment on Hrvoje's approach.
Included is a workbook with a solution. Here is an image of the data displayed on the worksheet:
I used the Excel add-in for Tableau. You can learn more about it here. The .txt attached is the data reshaped using this add-in. It takes just a few second to reshape the data to make it ingestible.