如何在画面上制作额外的过滤器 [英] how to make additional filters on tableau

查看:30
本文介绍了如何在画面上制作额外的过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是这个问题的下一部分.

您看到用户与此条件匹配,因为 user_id 5615 有 2 个交易在范围内和超出范围日期,并且与条件匹配,

问题是,条件只是找出与条件匹配的user_id,但是如何添加过滤器,这样我就可以过滤范围内的交易用户,所以user_id 5615只计算范围内的交易(一月, 9 2020) 且不计入 2017 年 9 月 21 日的交易

解决方案

最后我在这个网站上找到了答案https://kb.tableau.com/articles/howto/creating-a-filter-for-start-and-end-dates-参数

所以我用这个计算字段

[创建时间] >= [START_DATE] AND [创建时间] <= [END_DATE]

并转换为true,这样只会出现范围内匹配的选定内容

this is the next part from this question. how to Find out users_id with some conditions filter

i have a table like this

order_id | user_id | createdAt | transaction_amount

order_id as the id of the transaction, user_id as the user, createdAt as the dates, and transaction_amount is the transaction of each id order.

On previous questions, i want to find out users with my conditions based on the parameter (thanks to @Anil for the solution)

this calculated field based on @Anil solution

{Fixed [User Id]: sum(
if [Created At]<=[END_DATE] then 1 else 0 end)}>=2
AND
{FIXED [User Id]: sum(
IF [Created At]<=[END_DATE] AND 
[Created At] >= [START_DATE] THEN 1 ELSE 0 END)}>=1

this is the conditions that i want for user and have the solutions like below :

1. the users are doing transaction before last date in range ('2020-01-31') and atleast doing more than 1 transaction
2. and the users are at least doing 1 transaction in date range ('2020-01-01' until '2020-01-31')

so this is the example of the users who match with this condition

you see the users match with this conditions because the user_id 5615 has 2 transactions in range and out of range date, and it's matched with the condition,

the questions is, the condition are only to find out the user_id who matched with condition, but how to add the filters, so i can filter transaction user in range, so the user_id 5615 was only count the transaction in range (january, 9 2020) and not count the transaction in september 21, 2017

解决方案

finally i found the answers based on this website https://kb.tableau.com/articles/howto/creating-a-filter-for-start-and-end-dates-parameters

so i made calculate field with this

[Created At] >= [START_DATE] AND [Created At] <= [END_DATE]

and convert to true so only the selected with matched in range will be appear

这篇关于如何在画面上制作额外的过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆