Bird
Raised Fist0
Tableaubi_tool~20 mins

Geographic roles assignment in Tableau - Practice Problems & Coding Challenges

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Challenge - 5 Problems
🎖️
Geographic Roles Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Geographic Roles in Tableau

In Tableau, assigning a geographic role to a data field helps Tableau recognize it as a location. Which of the following is NOT a valid geographic role you can assign to a field?

AState/Province
BCity
CCurrency
DCountry/Region
Attempts:
2 left
💡 Hint

Think about what geographic roles represent: places or locations on a map.

dax_lod_result
intermediate
2:00remaining
Assigning Geographic Roles to Postal Codes

You have a dataset with a field named 'ZipCode' containing US postal codes. You want Tableau to recognize this field as a location on the map. What is the correct geographic role to assign?

APostal Code
BCountry/Region
CCity
DLatitude
Attempts:
2 left
💡 Hint

Postal codes are numeric or alphanumeric codes used for mail delivery areas.

visualization
advanced
2:00remaining
Visualizing Data with Incorrect Geographic Role

You assigned the geographic role 'Country/Region' to a field containing city names. What is the most likely outcome when you try to create a map visualization?

ATableau will plot incorrect locations or aggregate all data into one point.
BTableau will plot the cities correctly on the map.
CTableau will show a blank map with no marks.
DTableau will generate an error and prevent map creation.
Attempts:
2 left
💡 Hint

Think about what happens if Tableau misinterprets location data.

data_modeling
advanced
2:30remaining
Combining Geographic Roles for Hierarchical Mapping

You have three fields: 'Country', 'State', and 'City'. You want to create a drill-down map in Tableau that lets users explore data from country level down to city level. What is the best way to assign geographic roles to these fields?

AAssign 'City' to 'Country', 'State/Province' to 'State', and 'Country/Region' to 'City'.
BAssign 'Country/Region' to 'Country', 'State/Province' to 'State', and 'City' to 'City'.
CDo not assign any geographic roles; Tableau will detect automatically.
DAssign 'Country/Region' to all three fields.
Attempts:
2 left
💡 Hint

Think about the geographic hierarchy from larger to smaller regions.

🔧 Formula Fix
expert
3:00remaining
Troubleshooting Geographic Role Mismatch

You created a map visualization in Tableau using a field assigned the 'City' geographic role. However, many marks appear clustered in the wrong country. After checking, you find the city names are ambiguous (e.g., 'Springfield' exists in multiple states). What is the best way to fix this issue?

ARename all city names to unique names manually.
BChange the geographic role of the city field to 'Country/Region'.
CRemove the city field and use only country-level data.
DAdd the 'State' field with the 'State/Province' geographic role to the view to disambiguate cities.
Attempts:
2 left
💡 Hint

Think about how to provide more context to ambiguous location names.

Practice

(1/5)
1. What is the main purpose of assigning a geographic role to a field in Tableau?
easy
A. To tell Tableau what type of location data it is, enabling automatic map creation
B. To change the color of the map points
C. To filter data based on dates
D. To sort data alphabetically

Solution

  1. Step 1: Understand geographic roles in Tableau

    Geographic roles tell Tableau what kind of location data a field contains, like country or city.
  2. Step 2: Recognize the effect of assigning roles

    Assigning the correct role allows Tableau to create maps automatically and accurately.
  3. Final Answer:

    To tell Tableau what type of location data it is, enabling automatic map creation -> Option A
  4. Quick Check:

    Geographic role purpose = automatic map creation [OK]
Hint: Geographic roles tell Tableau how to map your data [OK]
Common Mistakes:
  • Thinking geographic roles change colors or filters
  • Confusing geographic roles with data sorting
  • Assigning roles to non-location data
2. Which of the following is the correct way to assign a geographic role to a field named City in Tableau?
easy
A. Double-click the field > Change Data Type > City
B. Right-click the field > Geographic Role > City
C. Drag the field to Filters shelf > Select City
D. Right-click the field > Sort > City

Solution

  1. Step 1: Locate the field in Tableau's Data pane

    Find the field named City in the data pane.
  2. Step 2: Assign geographic role via right-click menu

    Right-click the field, choose Geographic Role, then select City to assign the correct role.
  3. Final Answer:

    Right-click the field > Geographic Role > City -> Option B
  4. Quick Check:

    Assign role by right-click > Geographic Role [OK]
Hint: Right-click field > Geographic Role > choose correct location type [OK]
Common Mistakes:
  • Using Change Data Type instead of Geographic Role
  • Dragging field to Filters to assign role
  • Sorting field instead of assigning geographic role
3. Given a dataset with a field PostalCode assigned the geographic role 'Postal Code', what will Tableau do when you drag this field to the Rows shelf and add a map visualization?
medium
A. Tableau will treat postal codes as text and not create a map
B. Tableau will show a bar chart of postal codes
C. Tableau will return an error because postal codes are not supported
D. Tableau will plot points on the map based on postal code locations

Solution

  1. Step 1: Understand the effect of assigning 'Postal Code' geographic role

    Assigning 'Postal Code' role tells Tableau to interpret the field as location data for mapping.
  2. Step 2: Dragging the field to Rows with map visualization

    Tableau uses the postal codes to plot geographic points on the map automatically.
  3. Final Answer:

    Tableau will plot points on the map based on postal code locations -> Option D
  4. Quick Check:

    Postal Code role = map points plotted [OK]
Hint: Postal Code role enables map plotting by location [OK]
Common Mistakes:
  • Expecting a bar chart instead of a map
  • Thinking postal codes cause errors
  • Assuming postal codes are treated as text
4. You assigned the geographic role 'State' to a field named Region, but Tableau does not display the map correctly. What is the most likely cause?
medium
A. The Region field contains values that are not valid state names
B. You need to assign the role 'City' instead of 'State'
C. Tableau does not support mapping states
D. You forgot to refresh the data source

Solution

  1. Step 1: Check the data values in the Region field

    Invalid or misspelled state names cause Tableau to fail mapping correctly.
  2. Step 2: Understand Tableau's mapping requirements

    Tableau requires valid geographic names matching the assigned role to plot locations properly.
  3. Final Answer:

    The Region field contains values that are not valid state names -> Option A
  4. Quick Check:

    Invalid state names cause mapping errors [OK]
Hint: Check data values match assigned geographic role [OK]
Common Mistakes:
  • Changing role without checking data correctness
  • Assuming Tableau lacks support for states
  • Ignoring data refresh when problem is data quality
5. You have a dataset with separate fields for Latitude and Longitude but Tableau is not plotting the map correctly. Which sequence of steps correctly assigns geographic roles to fix this?
hard
A. Drag Latitude and Longitude to Filters shelf
B. Right-click Latitude > Geographic Role > Longitude; Right-click Longitude > Geographic Role > Latitude
C. Right-click Latitude > Geographic Role > Latitude; Right-click Longitude > Geographic Role > Longitude
D. Convert both fields to string data type

Solution

  1. Step 1: Assign correct geographic roles to each coordinate field

    Assign 'Latitude' role to the Latitude field and 'Longitude' role to the Longitude field to inform Tableau of their meaning.
  2. Step 2: Verify map plotting after role assignment

    With correct roles, Tableau can plot points accurately on the map using these coordinates.
  3. Final Answer:

    Right-click Latitude > Geographic Role > Latitude; Right-click Longitude > Geographic Role > Longitude -> Option C
  4. Quick Check:

    Correct role assignment for coordinates = accurate map [OK]
Hint: Assign Latitude and Longitude roles to matching fields [OK]
Common Mistakes:
  • Swapping latitude and longitude roles
  • Dragging coordinate fields to Filters instead of assigning roles
  • Changing data type to string instead of geographic role