问题
How to filter data on different worksheets based on clicks in Tableau. For example:
Sheet 1 - The partition looks like this:
+------+-------+-----+
| Name | Month | ... |
+------+-------+-----+
| A | Jan | ... |
| B | Jan | ... |
| C | Feb | ... |
| D | Mar | ... |
| ... | ... | ... |
+------+-------+-----+
Sheet 2 - The partition includes Month.
When I click on Jan on Sheet 1, can Tableau filter Jan on Sheet 2?
I tried including an URL and making the filter universal to all sheets but filter doesn't work "on click" does it?
回答1:
Filter actions are an essential and fundamental tool in Tableau, and you're going to want to master them fast, so I'd recommend hitting up this help page for a good overview of how they work.
Go to Actions… (if you're on a dashboard, you can access this menu from Dashboard, or access the same menu from Worksheet if you're working from a worksheet). Select Add Action > and choose Filter. Your source sheet (the sheet that will control the filter) will be Sheet 1. Your target sheet (the sheet that will be filtered) will be Sheet 2. Hit Select under Run action on:.
At the bottom of the menu, under Target Filters, choose Selected Fields. This will allow you to filter only the specific fields you define in this menu. Hit Add Filter... and choose Month
for the source and the target. You've now created a filter from Sheet 1 to Sheet 2 that will only filter based on Month
.
It's possible that you don't need to be that specific and can actually filter all fields. There's a quick way to do that if the sheets are in a dashboard. Click the dropdown menu at the top right of Sheet 1 in the dashboard and select Use as Filter. This will automagically create a filter using all fields from that sheet to all other sheets on the dashboard. If you need to tweak it, you can go to that same Actions... menu we just discussed, select the filter from the list, and change any of the things we discussed above from there.
回答2:
A filter can be used across multiple worksheets. On the filter triangle, select "Apply to worksheets" --> "Selected Worksheet". By default it will show only the worksheets in the current dashboard. At the bottom, check box show all worksheets. You can then select any sheet you want to apply the filter to.
来源:https://stackoverflow.com/questions/32722458/how-to-filter-data-on-different-sheets-based-on-clicks-on-tableau