在Tableau中,我需要创建一个新的计算字段。
此字段应该是其他记录字段的总和(请参见屏幕截图)。
我正在尝试执行以下操作:
IF [Town1] = "Mullingar.Co..." AND [Trip Type1] = "Holiday Trips"
THEN
IF [Town1] = "Mullingar.Co..."
AND [Trip Type1] = "Holiday Trips"
AND [Region1] = 2
THEN [Trip Count1] END
+
IF [Town1] = "Mullingar.Co..."
AND [Trip Type1] = "Holiday Trips"
AND [Region1] = 3
THEN [Trip Count1] END
+
IF [Town1] = "Mullingar.Co..."
AND [Trip Type1] = "Holiday Trips"
AND [Region1] = 4
THEN [Trip Count1] END
END
但是它总是返回NULL。
答案 0 :(得分:1)
您可能想使用FIXED尝试LOD表达式。某些东西 {FIXED [Town1]:SUM([Trip Count1])}