如何在 MicroStrategy 中进行条件计数?
How to conditional count in MicroStrategy?
尝试在 MicroStrategy 中执行以下语句无济于事。
Count(Distinct case when Insight <> 'Missing' then call_discuss_sk else null end)
和
Count(Distinct case when Quarters_to_this_quarter between 1 and 5 then call_discuss_sk else null end)
当前的 MSTR 代码如下所示,可以确认这不起作用...
Count<Distinct=True, UseLookupForAttributes=False>(ApplySimple("case when #0='Missing' then NULL else #1 END",Insight,[Call Discuss Sk])){~}
Table 我正在查询如下所示
这就是方法,请注意#0 和#1 指的是“”语句之后的字段,所以在这种情况下#0 = Insight 和#1 = [Call Discuss Sk]
ApplyAgg("Count(Case when #0='Missing' then null else #1 end)", Insight, [Call Discuss Sk]){~+}
尝试在 MicroStrategy 中执行以下语句无济于事。
Count(Distinct case when Insight <> 'Missing' then call_discuss_sk else null end)
和
Count(Distinct case when Quarters_to_this_quarter between 1 and 5 then call_discuss_sk else null end)
当前的 MSTR 代码如下所示,可以确认这不起作用...
Count<Distinct=True, UseLookupForAttributes=False>(ApplySimple("case when #0='Missing' then NULL else #1 END",Insight,[Call Discuss Sk])){~}
Table 我正在查询如下所示
这就是方法,请注意#0 和#1 指的是“”语句之后的字段,所以在这种情况下#0 = Insight 和#1 = [Call Discuss Sk]
ApplyAgg("Count(Case when #0='Missing' then null else #1 end)", Insight, [Call Discuss Sk]){~+}