Popular Searches
Popular Course Categories
Popular Courses

Creating Geographic Filters and Map Actions

Creating Geographic Filters and Map Actions

Geographic Data and Mapping

Creating Geographic Filters and Map Actions in Tableau – Complete Detailed Notes

Topic: Creating Geographic Filters and Map Actions

Course: Tableau Training

Objective: Learn how to filter geographic data, create interactive map-based dashboards, connect maps with charts and tables, and use dashboard actions to explore location-based business insights.


1. Introduction to Geographic Filters and Map Actions

Geographic filters and map actions are interactive features in Tableau that help users explore data based on locations. They allow users to focus on specific countries, states, cities, regions, postal codes, or individual geographic marks.

A geographic filter restricts the data displayed according to selected geographic values. A map action allows users to interact with a map and trigger an operation, such as filtering another chart, highlighting related information, or navigating to another worksheet.

Example: A retail company has a dashboard containing a map of Indian states, a sales bar chart, and a customer details table. When a user clicks Maharashtra on the map, the other views can update to display only the relevant sales and customer information.

Learning Objectives

  • Understand geographic filters and their business applications.
  • Create filters using country, state, city, and other geographic fields.
  • Apply geographic filters to worksheets and dashboards.
  • Create filter actions that respond to map selections.
  • Use highlight actions to emphasize related data.
  • Understand URL and navigation actions for map-based dashboards.
  • Configure action behavior when selections are cleared.
  • Build interactive geographic dashboards for business analysis.

2. What Is a Geographic Filter?

A geographic filter limits the data displayed in a Tableau view according to geographic values. It helps users analyze a selected location without having to examine all locations at once.

Geographic filters can be created from fields such as Country, State, City, Region, Postal Code, or other geographic dimensions in a dataset.

Example

Suppose a company sells products in Maharashtra, Gujarat, Karnataka, Delhi, and Tamil Nadu. A geographic filter can allow the user to select Maharashtra and examine sales, profit, customers, and orders associated with that location.

Benefits of Geographic Filters

  • Reduce the amount of data displayed in a view.
  • Make regional comparisons easier.
  • Allow users to focus on selected markets.
  • Support location-specific business decisions.
  • Improve dashboard usability.
  • Help users investigate geographic trends and outliers.

3. Types of Geographic Filters

Filter Type Description Example
Country Filter Limits the view to selected countries. Display India only.
State or Province Filter Displays selected states or provinces. Compare Maharashtra and Gujarat.
City Filter Restricts the view to selected cities. Display Mumbai and Pune.
Region Filter Filters records by a business or geographic region. Show western India.
Postal Code Filter Limits the view to selected postal codes when supported by the data and geographic configuration. Analyze service coverage by postal code.
Latitude and Longitude Filter Uses coordinate fields or calculated conditions to restrict geographic records. Analyze points within a coordinate range.
Map Selection Filter Filters data through selected marks on a map using a filter action or the Use as Filter option. Click a state to filter a sales chart.

4. Preparing Geographic Data in Tableau

Before creating geographic filters, ensure that the dataset contains valid geographic information.

Example Dataset

Country State City Sales Profit Customers
India Maharashtra Mumbai 500000 85000 1200
India Maharashtra Pune 320000 54000 800
India Gujarat Ahmedabad 280000 42000 650
India Karnataka Bengaluru 420000 76000 950
India Tamil Nadu Chennai 350000 58000 720
India Delhi New Delhi 380000 61000 700

Note: These figures are illustrative training data, not actual company performance figures.

Steps to Prepare the Data

  1. Open Tableau Desktop and connect to the dataset.
  2. Review the geographic fields in the Data pane.
  3. Check that fields such as Country, State, and City contain consistent location names.
  4. Right-click a geographic field and select Geographic Role if the field needs an appropriate role.
  5. Choose the correct role, such as Country/Region, State/Province, or City.
  6. Create a map by double-clicking a geographic field or dragging it into the view.
  7. Verify that the expected locations appear correctly.

If Tableau cannot recognize a location, check for spelling inconsistencies, missing values, duplicate place names, or incorrect geographic roles. Use Edit Locations when additional geographic clarification is required.

5. Creating a Basic Geographic Filter

A basic geographic filter allows users to choose one or more locations and restrict the worksheet to those locations.

Step-by-Step Procedure

  1. Create a map using a geographic field such as State or City.
  2. Locate the relevant geographic dimension in the Data pane.
  3. Drag the field to the Filters shelf.
  4. Select the geographic values that should remain in the view.
  5. Click OK.
  6. Right-click the field on the Filters shelf and select Show Filter.
  7. Use the displayed filter control to select different locations.
  8. Verify that the map updates according to the selected values.

Example

If the State filter contains Maharashtra, Gujarat, Karnataka, Delhi, and Tamil Nadu, selecting Maharashtra restricts the view to records associated with that state.

Important: A worksheet filter restricts that worksheet. To control several worksheets on a dashboard, configure the filter to apply to the appropriate worksheets or use a dashboard filter action.

6. Creating Country, State, and City Filters

Different geographic levels are useful for different types of analysis. Country filters support international analysis, state filters support regional analysis, and city filters support local analysis.

Country Filter

  1. Drag Country to the Filters shelf.
  2. Select the required countries.
  3. Click OK and select Show Filter.
  4. Choose a country to restrict the worksheet.

State Filter

  1. Drag State to the Filters shelf.
  2. Select the states that should be included.
  3. Display the filter control.
  4. Choose one or more states for regional analysis.

City Filter

  1. Drag City to the Filters shelf.
  2. Select the cities to include.
  3. Display the filter control.
  4. Choose the required cities.
  5. Confirm that the resulting map and other worksheet elements reflect the selection.

7. Creating Hierarchical Geographic Filters

A geographic hierarchy allows users to explore data at different levels, such as Country, State, and City. It supports drill-down analysis from a broad geographic area to a more detailed location.

Example Hierarchy

Country
  └── State
       └── City
            └── Store

How to Use a Geographic Hierarchy

  1. Use a geographic hierarchy or place the relevant geographic fields in the required order.
  2. Begin with a country-level or state-level map.
  3. Use the hierarchy's expand or drill-down controls when available.
  4. Explore state-level and city-level information.
  5. Apply filters when the analysis needs to remain restricted to selected locations.

A hierarchy and a filter are not the same thing. A hierarchy changes the level of geographic detail in the view, while a filter restricts which records are included.

8. What Are Map Actions in Tableau?

Map actions are interactive operations triggered by user interaction with geographic marks. They can connect a map to other worksheets, charts, tables, dashboards, or web pages.

For example, selecting a state on a map can filter a sales chart, highlight corresponding customer records, or navigate to a detail worksheet.

Benefits of Map Actions

  • Make dashboards interactive and easier to explore.
  • Connect maps with charts and tables.
  • Allow users to investigate selected geographic areas.
  • Reduce the need for multiple visible filter controls.
  • Support drill-down and detail-on-demand workflows.
  • Help users identify patterns across multiple views.

9. Types of Actions Used with Geographic Maps

Action Type Purpose Geographic Example
Filter Action Filters target worksheets based on selected source marks. Select a state to filter a sales chart.
Highlight Action Emphasizes related marks without necessarily removing other data. Highlight all records associated with a selected city.
URL Action Opens a URL using information from selected marks, when configured. Open a location-specific information page.
Go to Sheet Action Navigates to another worksheet or supported destination. Open a detailed regional analysis view.
Set Action Changes membership in a set according to user interaction. Select locations for a comparison group.
Parameter Action Updates a parameter based on an interaction. Choose a selected geographic value to drive a calculation.

The exact action options available depend on the Tableau version and workbook configuration. URL, set, and parameter actions have different purposes from a filter action and should be configured accordingly.

10. Creating a Map Filter Action

A filter action sends selected values from a source view to one or more target views. A map can therefore act as a control for charts, tables, and other worksheets on a dashboard.

Example

A dashboard contains three worksheets:

  • Sheet 1: Sales by State Map.
  • Sheet 2: Sales by Product Bar Chart.
  • Sheet 3: Customer Details Table.

When the user selects Maharashtra on the map, the bar chart and customer table display data related to the selected state.

Step-by-Step Procedure

  1. Create the map worksheet using State or another geographic field.
  2. Create the target worksheets, such as a sales bar chart and customer table.
  3. Add the worksheets to a dashboard.
  4. Select Dashboard > Actions.
  5. In the Actions dialog box, click Add Action > Filter.
  6. Enter a descriptive name, such as Filter Sales by Selected State.
  7. Select the map as the source sheet.
  8. Choose how the action runs: Select, Hover, or Menu.
  9. Choose the target worksheets that should respond to the action.
  10. Configure what happens when the selection is cleared.
  11. Choose All Fields or Selected Fields for the fields passed to the target views.
  12. If using Selected Fields, map the source geographic field to the corresponding target field.
  13. Click OK to save the action.
  14. Test the dashboard by selecting a state on the map.

Action Configuration Options

Option Description
Name A descriptive name for the action.
Source Sheets The worksheets that trigger the action.
Run action on Select Runs when a user clicks or selects marks.
Run action on Hover Runs when a user moves the pointer over marks.
Run action on Menu Runs when the user chooses the action from the mark's menu.
Target Sheets The worksheets affected by the action.
Clearing the Selection Controls what happens when the user clears the selection.
Target Filters Determines which fields are passed to target worksheets.

11. Using the Use as Filter Option

Tableau provides a convenient dashboard option called Use as Filter. It makes a worksheet act as a filter for other applicable views on the dashboard without requiring the user to configure a filter action manually.

Steps

  1. Open the dashboard containing the map and target charts.
  2. Open the map worksheet's shortcut menu.
  3. Select Use as Filter, or use the filter icon when it is available.
  4. Click a geographic mark, such as a state or city.
  5. Observe the other dashboard views update according to the selected mark.
  6. Clear the selection to restore the dashboard according to the configured behavior.

This is a quick method for creating simple map-driven filtering. For more precise control over source sheets, target sheets, selected fields, and clearing behavior, use Dashboard > Actions.

12. Configuring What Happens When a Selection Is Cleared

When a user clears a selected mark, Tableau needs to know how the target worksheets should respond. The clearing behavior is important for a predictable dashboard experience.

Option Behavior When to Use It
Show All Values Restores the target view to include all applicable values. When users should return to the full dashboard after clearing a selection.
Leave the Filter Keeps the current filtered results. When the selection should remain effective until another interaction changes it.
Exclude All Values Removes all values from the target view. When a target sheet should display nothing until a valid selection is made.

The exact label for the keep-filtered behavior can vary by authoring environment. Always test the dashboard after clearing a selection.

13. Creating a Highlight Action for Geographic Data

A highlight action emphasizes related marks while allowing other marks to remain visible. It is useful when users need to compare a selected location with the broader dataset.

Example

A map displays sales for every state. Selecting or hovering over a state highlights matching state records in a bar chart without necessarily filtering out every other state.

Steps

  1. Prepare the geographic map and a related chart.
  2. Open Dashboard > Actions.
  3. Click Add Action > Highlight.
  4. Give the action a meaningful name.
  5. Select the map as the source sheet.
  6. Choose Select, Hover, or Menu as the trigger.
  7. Choose the target worksheets.
  8. Specify the matching fields or highlighting behavior where applicable.
  9. Save the action and test it with different locations.

Filter Action Versus Highlight Action

Filter Action Highlight Action
Restricts the target view to matching data. Emphasizes matching data while retaining other marks where possible.
Useful for focused analysis of one region. Useful for comparing one region with all other regions.
May change the displayed records and totals. Generally changes visual emphasis rather than the underlying set of displayed records.

14. Creating a Geographic Navigation Action

A Go to Sheet action can help users move from a geographic overview to a more detailed analysis worksheet.

Example

A user selects a state on a sales map and opens a regional detail worksheet containing product performance, customer details, and monthly sales trends.

Steps

  1. Create an overview map and a detail worksheet.
  2. Add the required views to the workbook or dashboard.
  3. Open Dashboard > Actions.
  4. Select Add Action > Go to Sheet.
  5. Provide a descriptive action name.
  6. Choose the source worksheet.
  7. Choose the interaction trigger, usually Select or Menu.
  8. Choose the target worksheet.
  9. Save the action and test the navigation.

Important: Navigation and filtering are different. A Go to Sheet action changes the destination view; it does not automatically guarantee that the destination is filtered unless the workbook is configured to pass or retain the necessary context.

15. Creating a URL Action for Geographic Locations

A URL action can open an external web page using a URL that is fixed or constructed from selected field values. It can be useful when a geographic selection needs to link to additional location-specific information.

Example

A map contains store locations. Selecting a store can open an internal store information page or another relevant web resource.

Steps

  1. Create a map with a field that identifies each location.
  2. Ensure the required URL or location identifier is available in the dataset.
  3. Open Dashboard > Actions.
  4. Select Add Action > Go to URL.
  5. Enter an action name.
  6. Select the source worksheet and trigger type.
  7. Configure the destination URL, using supported field-value substitutions if needed.
  8. Choose the appropriate URL target, if available.
  9. Save and test the action.

Only use trusted URLs, and validate field values before using them to construct links.

16. Combining Geographic Filters with Other Dashboard Filters

A geographic filter can be combined with filters for product category, order date, sales, profit, or customer segment. This enables multidimensional analysis.

Example Dashboard Controls

  • State filter: Select Maharashtra or Gujarat.
  • Category filter: Select Furniture, Office Supplies, or Technology.
  • Date filter: Select the reporting period.
  • Map action: Select a city to filter the detail views.

Configuration Steps

  1. Create the map and supporting worksheets.
  2. Add geographic and business fields to the appropriate Filters shelves.
  3. Show the required filter controls.
  4. Use Apply to Worksheets to control which compatible worksheets receive a regular filter.
  5. Configure map filter actions separately if the map should control selected target worksheets.
  6. Test combinations of geographic and business filters.
  7. Check that titles, totals, legends, and tooltips reflect the displayed data correctly.

When filters and actions interact, their configuration matters. Test combinations carefully, especially when a dashboard contains multiple actions that affect the same target sheet.

17. Practical Project: Interactive Regional Sales Dashboard

Project Goal: Build an interactive dashboard that allows managers to explore sales and customer performance by geographic location.

Required Worksheets

Worksheet Purpose Suggested Fields
Regional Sales Map Shows the geographic distribution of sales. State, Sales, Profit
Sales by Category Compares product category performance. Category, Sales
Monthly Sales Trend Shows changes in sales over time. Order Date, Sales
Customer Details Lists relevant customer information. Customer Name, City, Sales

Implementation Steps

  1. Connect Tableau to a sales dataset.
  2. Validate the geographic roles for Country, State, and City.
  3. Create the Regional Sales Map and encode sales using color or size.
  4. Create the Sales by Category chart.
  5. Create the Monthly Sales Trend chart.
  6. Create the Customer Details table.
  7. Place all four worksheets on a dashboard.
  8. Show geographic, category, and date filter controls as required.
  9. Configure the map to filter the other worksheets when a location is selected.
  10. Choose Show All Values as the clearing behavior if users should return to the full dataset after clearing their selection.
  11. Add meaningful tooltips to the map.
  12. Test the dashboard with several states, cities, categories, and date ranges.
  13. Review the dashboard layout and publish or share it through the appropriate Tableau environment.

Expected Outcome

Users can select a state on the map and immediately investigate its product performance, monthly sales trends, and customer details. Regular filters provide additional control over the analysis.

18. Best Practices for Geographic Filters and Map Actions

  • Use meaningful action names: Names such as Filter by Selected State are clearer than generic names.
  • Choose the correct trigger: Select is appropriate for deliberate exploration; Hover is useful for quick highlighting but can be sensitive to accidental pointer movement.
  • Set clear reset behavior: Decide whether clearing a selection should restore all values, preserve the current filter, or show no results.
  • Limit unnecessary interactions: Avoid creating too many overlapping actions.
  • Match source and target fields correctly: Ensure geographic fields have compatible data types and values.
  • Keep the map readable: Use appropriate labels, colors, and geographic detail.
  • Use filters for deliberate restriction: Do not confuse filtering with highlighting or navigation.
  • Test cross-sheet behavior: Check how actions affect every target worksheet.
  • Protect sensitive information: Do not rely on dashboard actions alone for data security or row-level access control.
  • Verify the published dashboard: Test interactions in the target Tableau environment, not only in the authoring workbook.

19. Common Problems and Solutions

Problem Possible Cause Solution
Clicking a state does not filter the chart. The map action is missing, the target sheet is not selected, or the relevant fields are not mapped correctly. Review Dashboard > Actions and verify the source, target, and field mappings.
Some target worksheets do not update. Those sheets may not be included in the action or may use incompatible fields. Add the appropriate target sheets and confirm field compatibility.
Clearing the map selection does not restore all data. The clearing behavior is configured to leave the filter or exclude values. Edit the action and choose the intended clearing behavior.
Locations appear in the wrong place. Incorrect geographic roles, ambiguous names, or invalid coordinates. Correct the source data, geographic roles, or location settings.
Map selection filters too many records. The action uses All Fields or passes a field that is too broad. Consider Selected Fields and explicitly map the intended geographic field.
Map selection does not match the target field. Source and target fields have incompatible data types or values. Use compatible fields and normalize location names where necessary.
Hover actions feel distracting. Actions trigger whenever the pointer moves over a mark. Use Select instead of Hover for deliberate filtering.
Multiple filters produce unexpected results. Regular filters and actions interact or override each other. Review filter scope, action settings, and clearing behavior; test combinations.
URL action fails. The URL is invalid, incomplete, or contains unsupported field substitutions. Validate the URL format and test the action with representative values.

20. Practice Exercises

  1. Create a state-level map and add a geographic filter for State.
  2. Create a city filter and analyze sales in Mumbai, Pune, and Bengaluru.
  3. Build a dashboard with a map and a sales bar chart.
  4. Configure a filter action so selecting a state updates the bar chart.
  5. Test Show All Values and Leave the Filter clearing behaviors.
  6. Create a highlight action that emphasizes matching locations across two views.
  7. Create a Go to Sheet action that opens a regional detail worksheet.
  8. Build a dashboard that combines geographic, category, and date filters.
  9. Check whether every action works correctly when multiple filters are active.
  10. Write a short explanation of how geographic filters differ from map actions.

21. Interview Questions and Answers

Q1. What is a geographic filter in Tableau?

Answer: A geographic filter restricts the displayed data according to geographic values such as country, state, city, or postal code.

Q2. What is a map action?

Answer: A map action is an interaction triggered by a geographic mark that can filter, highlight, navigate, or otherwise interact with related views depending on the action type.

Q3. What is the difference between a geographic filter and a filter action?

Answer: A geographic filter is a field-based filter that restricts data. A filter action transfers selected values from a source view to target views, allowing users to filter a dashboard through interaction.

Q4. How do you create a filter action from a map?

Answer: Open Dashboard > Actions, select Add Action > Filter, configure the source map, trigger, target sheets, clearing behavior, and field mapping, then save and test the action.

Q5. What does Use as Filter do?

Answer: It provides a convenient way to make a dashboard worksheet filter other applicable views when a user selects marks.

Q6. What is the difference between Select and Hover actions?

Answer: Select actions run when the user selects marks, while Hover actions run when the pointer moves over marks.

Q7. What is the purpose of a highlight action?

Answer: It emphasizes related data across views without necessarily removing unrelated marks from the visualization.

Q8. What happens when a filter action is cleared?

Answer: The result depends on the configured clearing behavior, such as showing all values, leaving the filter in place, or excluding all values.

Q9. Can a map filter multiple charts?

Answer: Yes. A filter action can target multiple worksheets, provided the relevant target sheets and field mappings are configured correctly.

Q10. What is a Go to Sheet action?

Answer: It allows users to navigate from one worksheet to another through an interaction, such as selecting a mark on a map.

Q11. Can geographic filters be combined with date and category filters?

Answer: Yes. Geographic filters can be combined with other filters to analyze locations by product category, reporting period, customer segment, or other dimensions.

Q12. How can you troubleshoot a map action that does not work?

Answer: Verify the source sheet, target sheets, trigger type, clearing behavior, field mappings, geographic roles, and whether the target view uses compatible data fields.

22. Quick Revision Checklist

  • Understand the purpose of geographic filters.
  • Know how to create country, state, and city filters.
  • Understand geographic roles and location data quality.
  • Know the difference between a filter and a filter action.
  • Understand Filter, Highlight, URL, Go to Sheet, Set, and Parameter actions.
  • Know how to configure a map as a dashboard filter.
  • Understand source sheets, target sheets, trigger types, and field mapping.
  • Know the available clearing-selection behaviors.
  • Practice combining map actions with category and date filters.
  • Test every action before publishing the dashboard.

23. Conclusion

Geographic filters and map actions make Tableau dashboards more interactive and useful for location-based business analysis. Geographic filters help users restrict data to selected locations, while map actions let users interact directly with geographic marks to filter, highlight, or navigate to related information.

By combining maps with charts, tables, date filters, and category filters, you can build dashboards that help users investigate regional performance and make informed decisions. The key is to configure the source and target views correctly, select appropriate fields, and test the dashboard's behavior carefully.


24. Course and Learning Resources

Explore these training and official documentation resources to strengthen your Tableau skills.

whatsapp