英文:
Selection in the Dashboard to reflect in the drop-down in Tableau Dashboard
问题
我已经将仪表板创建为级联过滤器(选择一个过滤器会影响其他过滤器的选择),在附带的示例中运行良好。<br /> 但我想要的是 --> 当我在工作表内点击房屋 h2 时,应该在下拉值中反映出来。
例如:在下面的图像中,当我点击 h2 时,由于 h2 的值已更改其他工作表的值 --> 我希望过滤器的下拉菜单也反映出“h2”而不是“全部”。
英文:
I have created the dashboard as the cascading filter(1 filter when selected affects the choice of other filters) which is working fine in attached Sample. <br /> But I want that --> when I click on the house h2 within the sheet , that should get reflected in the drop down value .
eg: In the image below when I click on the h2 since the h2 has changed the value of other sheets as well --> I want the drop-down of filter to reflect "h2" as well instead of "All"
答案1
得分: 1
可以通过使用参数和计算字段来实现这个功能。
-
创建一个名为“Selected house color”的参数,数据类型为“String”。在“Values”部分输入所有房屋颜色(h1、h2、h3,等等)。
-
创建一个名为“Selected house color filter”的计算字段,在公式部分输入以下公式:
IF [House color] = [Selected house color] THEN [House color] END
-
添加过滤器“Selected house color filter”。
-
添加一个更新参数的操作。在添加操作中选择“Change Parameter”。命名操作(例如,“Select House Color”)。选择条形图作为源表。
选择“Select”作为操作类型。
在“Target”部分,选择之前创建的参数(“Selected house color”)。
在“Run action on”部分,选择“Select”作为“Clearing the selection will”选项。
英文:
You can achieve this functionality using a parameter and a calculated field.
-
Create a parameter "Selected house color" with data type "String". In the "Values" section enter all house color (h1, h2, h3, ....).
-
Create a calculated field as "Selected house color filter", in the formula section, enter the following formula:
IF [House color] = [Selected house color] THEN [House color] END
-
Add filter "Selected house color filter"
-
Add an action to update the parameter. In add action choose "Change Parameter." Name the action (e.g., "Select House Color").Select the bar chart as the source sheet.
Choose "Select" as the action type.
In the "Target" section, select the parameter you created earlier ("Selected house color").
In the "Run action on" section, select "Select" under "Clearing the selection will" option.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论