[英]countif for distinct count in tableau
The following command works in Excel.以下命令适用于 Excel。 But I need a distinct Count of Client Id's where we left a message and the client called back in Tableau
但是我需要一个不同的客户 ID 计数,我们在其中留下了一条消息,客户在 Tableau 中回电
=COUNTIFS('Sheet2'!C:C,"=Left Message", 'Sheet2'!D:D,"=Spoke to client")
You didn't described your data set, but assuming it looks like something like您没有描述您的数据集,但假设它看起来像
Client ID | Left Message Date | Client Returned Call Date
333 | 2/2/2021 | NULL
444 | 3/15/2021 | 3/17/2021
555 | NULL | NULL
Then something like this should work那么这样的事情应该可以工作
if [Left Message?] and [Spoke to Client?] then [Client ID] end
if [Left Message?] and [Spoke to Client?] then [Client ID] end
That field will have the Client ID for those clients that satisfy the condition, and NULL otherwise.该字段将包含满足条件的客户端的客户端 ID,否则为 NULL。
Note, COUNTD() can be expensive computationally on large data sets, but fine on smaller ones.请注意, COUNTD() 在大型数据集上的计算成本可能很高,但在较小的数据集上却很好。 If you hit performance issues, you typically then want to reshape your data.
如果遇到性能问题,您通常会想要重塑数据。 Worry about that only if you need to
仅在需要时才担心
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.