數(shù)據(jù)準(zhǔn)備:
建立一個thermometer表格或者CSV文件
Country,Path,Value
United States,1,0.9
United States,101,0.9
Canada,1,0.5
Canada,101,0.5
United Kingdom,1,0.7
United Kingdom,101,0.7
France,1,0.3
France,101,0.3
觀察一下數(shù)據(jù)結(jié)構(gòu),自己可以體會怎么應(yīng)用到其他數(shù)據(jù)上面
建立計算字段:
Path (數(shù)據(jù)桶):
右鍵 Path.
設(shè)置數(shù)據(jù)桶大小1
確認(rèn)
Index:
INDEX()-1
TC_Value:
WINDOW_MAX(MAX([Value]))
TC_Thermometer:
[Index]*[TC_Value]
TC_Size:
IF [TC_Thermometer] = 0 THEN
1
ELSE
0
END
TC_Size (Background):
IF [TC_Thermometer] = 0 THEN
1
ELSE
0
END
TC_Color:
IF [Index]/100 < [TC_Value] THEN
[Index]
ELSE
NULL
END
開始操作:
把標(biāo)記改為線
把 Country 拖到列
把Path (數(shù)據(jù)桶)拖到行
右鍵,選擇,顯示缺失值
把這個Path (數(shù)據(jù)桶)拖到,路徑
把 TC_Thermometer 拖到行
右鍵,編輯表計算
嵌套計算選擇 Index.
計算依據(jù)選擇特定維度
選擇Country and Path (數(shù)據(jù)桶)。 Country 在上面
所在級別,最深
重啟間隔 Country.
嵌套計算選擇 TC_Value.
計算依據(jù)選擇特定維度
只選 Path (數(shù)據(jù)桶)
把 TC_Size 拖到大小
右鍵,計算依據(jù)Path (數(shù)據(jù)桶)
得到如下:
接下來:
把 Index 拖到 TC_Thermometer的左邊
在 Index 選項卡 替換 TC_Size 為 TC_Size (Background).
右鍵行上面的 TC_Thermometer 選擇雙軸
同步軸
得到如下:
最后調(diào)整各種個性化參數(shù)
關(guān)鍵點
調(diào)整 TC_Size大小
調(diào)整 Size of TC_Size (Background)大小
tableau文件
鏈接:https://pan.baidu.com/s/1UiJ3j-ZiSMoYTWLWXC9utg
提取碼:whf9