0
我有一個跟蹤玩家資料表:訪問計算字段與IF
Player Pts Reb Ast Blk Stl Tov
Jeff Teague 21 11 15 1 2 4
我想補充一點,計算出該玩家取得的幻想點計算的字段。球員得到:
1 fantasy point per Pts
1.25 fantasy points per Reb
1.5 fantasy points per Ast
2 fantasy points per Ast
2 fantasy points per Stl
-.5 fantasy points per Tov
1.5 fantasy points IF any two of Pts, Reb, Ast, Blk, or Stl are 10 or more
3 fantasy points IF any three of Pts, Reb, Ast, Blk, or Stl are 10 or more
因此,在這個例子中,他會得到(21)+(11×1.25)+(15×1.5)+(2)+(2×2) - (5 * 4) +(1.5)+(3)= 61.75個幻想點。額外的1.5和3是因爲Pts,Ast和Reb都是10或更大。
到目前爲止計算字段我有:
([PTS])+([TRB]*1.25)+([AST]*1.5)+([STL]*2)+([BLK]*2)-([TOV]*.5)
但我無法弄清楚如何將最後兩個因素的IF語句。
每個Ast1.5個幻想點每個Ast2個幻想點。你說的1.5和2分爲Ast –