在Tableau中以LOD计算排名

时间:2018-07-19 01:51:18

标签: tableau

我有一张看起来像这样的桌子

column1 column2 value
a        d        10
a        e        20
b        d        30
b        e         40

and I want to get the rank of the value without considering column1 so I use and LOD to first get the total value with:  {EXCLUDE [column1]: SUM([value])}

this works and produces

  rank
d  40
e  60
d  40
e  60

BUT what I want to do is get the rank. So I'd like 

  rank
d  2
e  1
d  2
e  1

when I do this  RANK( {EXCLUDE [Pct Of Adv Buckets]: SUM([Notional])} )

I get an error "all fields must be aggregate or constants when using table calcualtions. Can you advise how to get teh rank.

1 个答案:

答案 0 :(得分:0)

您是否尝试过RANK(SUM({EXCLUDE [Column1]:SUM​​([Value])})) 我有不同的看法,但我认为那是您在寻找。