简体   繁体   English

Tableau计算字段过滤

[英]Tableau Calculated Field Filtering

I am struggling with Custom Filter using Calculated Field. 我正在使用“计算字段”自定义过滤器。 Below is the screenshot of the same visualized chart. 以下是同一可视化图表的屏幕截图。

屏幕截图

What I am struggling is to create a filter where I can give a scale of Correlation, example - I want to show all the age groups and Ethnicity where the Correlation value is between 0.6 and 0.9 我正在努力创建一个过滤器,在该过滤器中可以给出相关度的比例,例如-我想显示相关值在0.6到0.9之间的所有年龄段和种族

I am able to bring in one Measure Value and as you can see, the filter slider is there. 我可以输入一个“测量值”,并且您可以看到,过滤器滑块在那里。 But I need that filter to work on all the fields and not just one value. 但我需要该过滤器才能在所有字段上工作,而不仅仅是一个值。 Like a Universal Slider for all the values. 像通用滑块一样适用于所有值。

Please help. 请帮忙。

You cannot set one filter to be used on several measures. 您不能将一个过滤器设置为可用于多种测量。 However what you can do is create two parameters and use them to filter each measure in relation. 但是,您可以做的是创建两个参数,并使用它们过滤相关的每个度量。

  1. create 2 parameters minCorrelation and maxCorrelation with values between 0 and 1 and stepsize of 0.1 (or whatever granularity you need) 创建2个参数minCorrelation和maxCorrelation,其值介于0和1之间,步长为0.1(或您需要的任何粒度)
  2. open one of your filters and go to formula, use a custom formula like [0-17] > [minCorrelation] AND [0-17] < [maxCorrelation] 打开一个过滤器并转到公式,使用自定义公式,例如[0-17] > [minCorrelation] AND [0-17] < [maxCorrelation]
  3. repeat that for every measure and the filter will adjust when you change the values for your parameters. 对每个度量重复此操作,并且当您更改参数值时,过滤器将进行调整。

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

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