在过滤器中隐藏值-Tableau [英] Hide value in filter - Tableau

查看:187
本文介绍了在过滤器中隐藏值-Tableau的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对过滤器有疑问.

我有一个尺寸为(0、1、2、3、4、5)的尺寸. 我想将此维度用作过滤器,但不希望让用户选择过滤值"0". 我不想排除值0,相反-我希望这些值始终出现在视图中,并让用户有机会仅在(1、2、3、4、5)之间进行过滤.

I have a dimension with the values (0, 1, 2, 3, 4, 5). I want to use this dimension as a filter, but not to let the user the option to filter out the value "0". I don't want to exclude the values 0, the opposite - I want these values to ALWAYS be in the view, and let the user the chance to filter only between (1, 2, 3, 4, 5).

这是一个选择吗?要从过滤器中删除一个值,而不是从数据中删除一个值?

Is that an option? To remove a value from the filter but not from the data?

任何帮助将不胜感激 谢谢!!

Any help would be very appreciated Thank you!!

推荐答案

如果我正确理解了您的问题,那么我的答案是-是的,有一种解决方法.

If I understood your question correctly then my answer is - Yes, there is a way to do so.

假设您的维度名称是"dim_field",其值是(0、1、2、3、4、5),然后

Let's say your dimension name is 'dim_field' having value (0, 1, 2, 3, 4, 5) then

  • 创建一个参数-我们将其命名为"parm_field".在创建参数窗口中,选择数据类型"作为字符串,选择允许的值"作为列表,选择从字段设置"作为dim_field(即,您标注),然后在此列表中再添加一行作为全部".将此行拖到顶部,然后选择当前值"作为全部".最重要的是删除具有"0"的行,因为您不希望此内容出现在过滤器中,然后单击确定".
  • 单击此参数并选择显示参数控件"
  • 创建一个计算字段"is_DimField_selected"并将其定义为:
IF [parm_field] == 'All' THEN 'Y'
ELSE
  IF [parm_field]=[dim_field] THEN 'Y'
  ELSE 'N'
  END
END


  • 添加此计算字段以进行过滤,然后选择"Y".瞧!

    • Add this calculated field to filter and select 'Y'. Voila!
    • 如果解决了您的问题,别忘了将其标记为答案;)

      这篇关于在过滤器中隐藏值-Tableau的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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