求创建类似指定页面的Tableau Dashboard Filter(点击左侧联动地图)
Hey there! Let's walk through how to build that interactive filter-to-map dashboard in Tableau, just like the 3W-style view you're aiming for. This relies on Tableau's built-in Action Filters to link your left-side selection panel with the right-side map. Here's a detailed, actionable example:
We'll create two linked views: a clickable selection panel on the left, and a geographic map on the right. When a user clicks an option in the left panel, Tableau will automatically filter the map to show only the corresponding data.
1. Prep Your Dataset
First, make sure your data includes these key fields (adjust based on your use case):
- Geographic data: Region names, latitude/longitude coordinates (Tableau can auto-generate coordinates for known regions, but explicit lat/lon is more reliable)
- Filter dimension: The category users will click on (e.g., Cluster Type, Organization, Activity Sector)
- Metric: The value you want to visualize on the map (e.g., Number of Projects, Beneficiary Count)
Sample data structure:
| Region Name | Latitude | Longitude | Cluster Type | Project Count |
|---|---|---|---|---|
| Kabul | 34.5133 | 69.1997 | Health | 14 |
| Kandahar | 31.6340 | 65.7890 | Education | 9 |
| Herat | 34.3480 | 62.2087 | WASH | 17 |
2. Build the Left-Side Selection Panel
- Drag your filter dimension (e.g.,
Cluster Type) to the Rows shelf - Change the view type to a Text Table (or Tree Map if you need hierarchical categories)
- Customize the formatting: Remove grid lines, adjust font size, and set a clean background to make options easy to click
- Rename this worksheet something clear, like
Cluster Selection Panel
3. Build the Right-Side Map View
- Drag your geographic field (e.g.,
Region Name) to the Marks > Geographic shelf — Tableau will auto-generate a base map - Drag your metric (e.g.,
Project Count) to Marks > Size (to make larger values bigger) and/or Marks > Color (to add a color gradient) - Rename this worksheet
Regional Project Map
4. Set Up the Interactive Action (Critical Step!)
This is what makes the click-to-filter magic happen:
- Go to the top menu: Worksheet > Actions
- Click Add Action > Filter
- In the action configuration window:
- Source Sheets: Select your left-side panel (
Cluster Selection Panel) - Target Sheets: Select your right-side map (
Regional Project Map) - Trigger: Choose Select (so the filter activates when a user clicks an option)
- Filter Action: Select Keep Only Selected Values
- Optional: Check Show Selected Marks in View to highlight the clicked option in the panel
- Source Sheets: Select your left-side panel (
- Click OK to save the action
5. Assemble the Dashboard
- Create a new dashboard by clicking Dashboard > New Dashboard
- Drag your
Cluster Selection Panelto the left side of the dashboard, andRegional Project Mapto the right - Adjust the layout sizes to fit your design (e.g., make the panel narrow and the map wide)
- Test it out: Click any cluster in the left panel, and the map will instantly update to show only that cluster's projects!
- Enable multi-select: Hold
Ctrl(Windows) orCmd(Mac) to click multiple options, or adjust the action settings to allow multi-select by default - Add highlighting: Create a Highlight Action to make the clicked option stand out in the panel
- Add tooltips: Customize map tooltips to show extra details (e.g., region name, project count, partner organizations)
- Use hierarchies: If your data has nested categories (e.g., Country > Province > District), build a hierarchy to let users drill down further
内容的提问来源于stack exchange,提问作者Hafizullah Mahmudi

