创建多个可变条件
这是我的问题的概述。
我有一个标题为“产品”的列,它经过筛选后在列中显示 5 种产品类型。这些行显示所有客户 (2000)。测量值显示产品的数量。我想创建一个计算字段,表示:如果 >1 产品的余额大于 0,则为 true,否则为 false。我希望每个客户都能看到这一点。基本上,我想过滤掉只有一种产品类型余额的客户。我已经尝试了几种不同的语句,但无法正确校准它以匹配我在这里尝试做的事情。任何想法表示赞赏。
Here’s the overview of my problem.
I have a column titled product and it’s filtered down to show 5 product types in the columns. The rows show all customers (2000). And the measure values show a quantity for the products. I want to create a calculated field that says: if >1 product has a balance greater than 0, then true else false. And I want this to appear for every customer. Basically, I want to filter out customers that only have a balance for one product type. I’ve tried several different statements, but can’t calibrate it correctly to match what I’m trying to do here. Any thoughts are appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 Superstore 数据,我做了以下应该适合您的用例的内容。
创建客户的 LOD 计算并计算他们拥有的产品数量。添加大于将其转换为 T/F。在我的示例中,我做了 2 个只是为了说明,因此请进行相应调整。
筛选 True 以仅捕获拥有 3 类产品的客户。
Using Superstore data, I made the following which should work for your use case.
Create a LOD calc on customer and count distinct the amount of products they have. Adding a greater than converts this to T/F. In my example I did 2 just to illustrate so adjust accordingly.
Filter for True to capture just the customers with 3 categories of products.