简体   繁体   English

在 Tableau 中计算新用户组

[英]Count New Users Group in Tableau

These are the fields that I have Dimension: Usertype , when you filter I have "New Visitor" "Returning Visitor" Measure: users - sum of both new & returning visitors这些是我拥有的字段 Dimension: Usertype ,当您过滤时,我有“新访客”“回访者”度量:用户- 新访客和回访者的总和

How can I create the calculation that will count only New Visitors inside the users measure pill without using the filter option?如何在不使用过滤器选项的情况下创建仅计算用户测量药丸内的新访问者的计算?

For those wondering answer is: usertype - dimension (New Visitor, Returning Visitor) users - measure (Total of both New Visitor and Returning Visitor)对于那些想知道的答案是:用户类型 - 维度(新访问者,回访者)用户 - 衡量(新访问者和回访者的总和)

MIN({FIXED [usertype]='New Visitor': SUM([users])}) MIN({FIXED [usertype]='New Visitor': SUM([users])})

An alternate, possibly more efficient, approach is to define a calculated field that incorporates your filter.另一种可能更有效的方法是定义一个包含过滤器的计算字段。 Say define a calculated field called, New Users , as假设定义一个名为New Users的计算字段,如

IF [Usertype] = “New Visitor” THEN [Users] END

(This field will evaluate to null if the [Usertype] <> “New Visitor”) (如果 [Usertype] <> “New Visitor”,则此字段将评估为 null)

If you then place SUM([New Users]) on some shelf, you'll have your result - without the complexity of an LOD calculation.如果您随后将 SUM([New Users]) 放在某个架子上,您就会得到结果 - 没有 LOD 计算的复杂性。 LOD calcs are incredibly useful, but they add complexity and performance cost, so I'd recommend using them only when needed. LOD calc 非常有用,但它们增加了复杂性和性能成本,因此我建议仅在需要时使用它们。 In many cases, such as this, simpler methods work fine.在许多情况下,例如这样,更简单的方法可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM