如何在Tableau中组合两个相似的列?

时间:2018-02-01 21:29:36

标签: tableau tableau-public

我正在使用Tableau Public从' |'中读取数据。分隔的文本文件。目标是确定每个玩家受到的伤害与收到的伤害程度。目前,数据仅显示每个攻击者的行数。如何更改数据以便为每个播放器看到一行?

示例来源:

Attacker Name | Attacker Nation | Defender Name | Defender Nation | Attacking Damage | Defending Damage
Bob | Builder | Felix | Fixer | 100 | 120
Bob | Builder | Ralph | Wrecker | 150 | 75
Felix | Fixer | Ralph | Wrecker | 125 | 150

期望的输出:

Name | Nation | Opponent Name | Opponent Nation | Damage Dealt | Damage Received
Bob | Builder | Felix | Fixer | 100 | 120
Bob | Builder | Ralph | Wrecker | 150 | 75
Felix | Fixer | Bob | Builder | 120 | 100
Felix | Fixer | Ralph | Wrecker | 125 | 150
Ralph | Wrecker | Bob | Builder | 75 | 150
Ralph | Wrecker | Felix | Fixer | 150 | 125

0 个答案:

没有答案