如何根据 QlikSense 中另一个 table 的变量 select 一个 table 中的值?

How to select values in one table based on variable from another table in QlikSense?

我有两个table,

它们由 CustomerID 链接。我已经创建了一个变量输入 Sales = StoreSales,我想显示一个 table,其中包含基于变量 Sales 的商店出现的相对频率。所以假设我选择了 Sales>3000,我的 table 将如下所示:

但是如果我在 table 中使用条件 =if(round([StoreSales])>=$(Sales), StoreName),我会在 table 中得到空值。我要去哪里 wrong/what 我错过了吗?我的 table 没有链接吗?还是因为我有重复的相同商店名称的 CustomerID?

看看我为您创建的 table。您的表达式 =if(round([StoreSales])>=$(Sales), StoreName) 返回空值,因为您没有告诉它如何处理真实值。 count() 聚合可以解决这个问题。

您需要的另一部分是 'all' 修饰符,这样您就可以通过将单个商店数量除以高于阈值的销售总数来确定您想要的百分比。

阈值不同