如何获得不同 ID 列表调用的不同值?

How get the distinct value of calls of distinct ID list?

我有以下问题:假设我在 QlikView 中加载了以下 table:

现在我想计算不同 ID 的数量 "calls over 60 sec" 和不同 ID 的数量 "calls from other over 60 sec",如果 "calls over 60 sec" 为 0。

使用 For count(distinct(if([calls over 60 sec]>0, ID))) 我得到 = 2,这是正确的。

现在for count(distinct(if([calls over 60 sec]=0 and [calls from other over 60 sec]>0, ID)))我得到3。

但我要找的答案是1。因为总共几个月只有1个id被其他人调用。

或者我需要设置表达式?基本上,我会为所选月份计算不同的 id 数量以及上述条件。

我很感激每一个答案。

试试,

COUNT ( DISTINCT { < [calls over 60 sec]={"0"} , [calls from other over 60 sec] = { ">0" }  > }  ID)

并且汇总:

// SUM ( // sometimes

Aggr (
COUNT ( DISTINCT { < [calls over 60 sec]={"0"} , [calls from other over 60 sec] = { ">0" }  > }  ID)
, year, month
)

// )

还有,请不要在公式中使用 "IF"