我翻轉調查數據,因此可以在Tableau中使用它。這裏是SPSS中的示例數據(請記住,每個變量都具有值&變量標籤)。變量與保留變量/值標籤的變化Tableau設置 - 重新構建Tableau的數據,翻轉數據
ID age rate1 rate2 rate3 mr_1 mr_2 mr_3 ...
1 35 8 3 2 1 2
2 40 2 2 3 2
3 41 6 3 5 2 3
4 43 3 3 1
where rate1-3 are 3 rating questions。 Mr_1到mr_3是多重響應檢查所有的應用問題
我使用翻轉數據這(你是什麼種族1 =白2 =西班牙裔美國人,3 =黑色):
VARSTOCASES
/MAKE answer FROM age rate1 rate2 rate3 mr_1 mr_2 mr_3
/INDEX=Index1(7)
/KEEP= All
/NULL=KEEP.
結果看起來像這樣的:
ID Index1 answer
1 1 35
1 2 8
1 3 3
1 4 2
1 5 1
...
...
...
連接這時候的Tableau工作哪個就好。但是,我想要的不僅僅是Index1作爲已翻轉的每個變量的標識符。我想是這樣的(VAR,VarLab,ValueLabel只是字符串變量):
ID Var VarLab answer ValueLabel
1 'age' 'What is your age?' 35 '35'
1 'rate1' 'Rate food' 8 '8'
1 'rate2' 'Rate wait time' 3 '3'
1 'rate3' 'Rate bathroom' 2 '2'
1 'mr_1' 'Ethnicity' 1 'White'
1 'mr_2' 'Ethnicity' 2 'Hispanic'
...
...
...
正如你所看到的,我保留了變量標籤,標籤值和變量名本身每個翻轉變量。這是Tableau需要「高」數據集的理想Tableau設置。另外,我可以使用響應的字符串或數字表示形式。最後,我不再需要編輯Tableau內部的別名。任何想法如何做到這一點?也許這將需要python或宏?任何想法,不勝感激。
謝謝!
如果您使用的Tableau查看調查數據,檢查出的博客http://datarevelations.com幾個好的建議 –