获取相邻的列词?
Fetch adjacent column word?
我想要像“if max(col1) then col2 end”这样的条件,在画面计算字段中,输出将为“e”。
提前致谢
我已经按照这些步骤进行了尝试,它看起来很有效:)
# first find the max. Using fixed lod calculation to do it across the whole dataset. The 1 is the same value across all so its doing a group max, but the group is the full data
MaxCol1: {fixed 1: MAX(Col1)}
# pick out rows where max is found in Col1
Col1Match: Col1=[MaxCol1]
# find Col2 where there's a match and fill rest with NULL's
Col2Value: IF [Col1Match] then Col2 else NULL end
# This will be a bunch of NULL's and "e"
# Finally, do the same as in the first calculation to get the result
Output: {fixed 1 : max([Col2Value])}
您现在可以尝试将其中的一些步骤组合在一起,稍微清理一下 space。这够用了还是你的真实数据更复杂?
最好,
强尼
简单使用
If [col1] = {max([col1])} then col2 end
将其放在视图中并隐藏空值,您将获得所需的值。
我想要像“if max(col1) then col2 end”这样的条件,在画面计算字段中,输出将为“e”。 提前致谢
我已经按照这些步骤进行了尝试,它看起来很有效:)
# first find the max. Using fixed lod calculation to do it across the whole dataset. The 1 is the same value across all so its doing a group max, but the group is the full data
MaxCol1: {fixed 1: MAX(Col1)}
# pick out rows where max is found in Col1
Col1Match: Col1=[MaxCol1]
# find Col2 where there's a match and fill rest with NULL's
Col2Value: IF [Col1Match] then Col2 else NULL end
# This will be a bunch of NULL's and "e"
# Finally, do the same as in the first calculation to get the result
Output: {fixed 1 : max([Col2Value])}
您现在可以尝试将其中的一些步骤组合在一起,稍微清理一下 space。这够用了还是你的真实数据更复杂?
最好, 强尼
简单使用
If [col1] = {max([col1])} then col2 end
将其放在视图中并隐藏空值,您将获得所需的值。