Tableau api 获取相邻列字?
我想要的条件是,若maxcol1,那个么col2在tableau计算的feild中结束,输出将是e。Tableau api 获取相邻列字?,tableau-api,Tableau Api,我想要的条件是,若maxcol1,那个么col2在tableau计算的feild中结束,输出将是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 d
提前感谢我已经用这些步骤尝试过了,看起来效果不错:
# 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])}
现在,您可以尝试将这些步骤结合起来,稍微清理一下空间。这就足够了,还是您的真实数据更复杂
最好的,
Jonny我尝试了以下步骤,看起来效果不错:
# 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])}
现在,您可以尝试将这些步骤结合起来,稍微清理一下空间。这就足够了,还是您的真实数据更复杂
最好的,
琼尼简单地使用
If [col1] = {max([col1])} then col2 end
将此项放到视图中并隐藏空值,您将获得所需的值。只需使用
If [col1] = {max([col1])} then col2 end
将此项放到视图中并隐藏空值,您将获得所需的值。如果两个值在第二列中用c映射,会怎么样?或者您确定只有一个这样的值吗?如果两个值在第二列中用c映射会怎么样?或者您确定只有一个这样的值吗