Early Access: The content on this website is provided for informational purposes only in connection with pre-General Availability Qlik Products.
All content is subject to change and is provided without warranty.
Skip to main content Skip to complementary content

Controlling visible map data with drill-down layers

This example will show you how to build a map with a top-level area layer that drills down into with two point layers.

When creating a map that has multiple points of data located in a wide geographical area, you can use drill-down dimensions to display your layers in a hierarchy. As users make selections in a layer, the dimension displayed in the layer changes to the next dimension in the drill-down dimension. This enables you to use display data at different selection levels within your map, ensuring only the most relevant information is being displayed.

We have a list of all historical sites in the United States National Park Service's National Register of Historic places. When we add the cities that historical sites are located in to a map as a point layer, we get accurate locations for our bubbles. It could be made more understandable with better organization, however.

Map with point layer.

How then can we organize this information better, especially if we also want to add in another point layer containing airports to help plan how to get to the different sites?

To solve this problem, we will create a map of the United States of America with a layer of states that drills down to the county level. Drilling down to the county level will also show the cities that contain the historical sites as data points, as well as all airports for that state and the surrounding states.

Map with drill down layer displaying counties in USA.

Map with drill down layer displaying counties in USA and cities and airports as data points.

Dataset

This example uses two sets of data:

  • Federal listings: National Register of Historic Places listed properties from federal agencies (federal_listed_20190404.xlsx)

    This data set is available from the National Park Service National Register of Historic Places. It contains data about all registered history places, their location, and the federal agencies associated to them.

    federal_listed_20190404.xlsx.

  • Airport data

    This table contains data for airports in the United States. It consists of each airport's International Air Transport Association (IATA) code, city, and state or territory.

    You must import this data into Qlik Sense either by adding to a spreadsheet that you then import into Qlik Sense or by importing the table from this help page as a web file.

Instructions

Once you have loaded the data sets into a new app in Qlik Sense, you can begin building your map. To make the example map, you must complete the following tasks: 

  1. Create the drill-down dimensions.
  2. Add the map to our sheet.
  3. Add the State-County area layer.
  4. Add the State-City point layer.
  5. Add the State-Airport point layer.
  6. Add the Resource filter pane.

Creating the drill-down dimensions

First, you need to create three drill-down dimensions. This will create the relationships between State and the fields County, City, and Airport, enabling the County, City, and Airport layers to become visible after a state from the State layer has been selected.

  1. In sheet view, click Edit Edit sheet in the toolbar.
  2. In Assets, click Master items.
  3. In Dimensions, click Create new.
  4. Select Drill-down.
  5. Add the field State to the dimension.
  6. Add the field County to the dimension.
  7. After Name, type State-County.
  8. Click Create..
  9. Add the field State to the dimension.
  10. Add the field City to the dimension.
  11. After Name, type State-City.
  12. Click Create..
  13. Add the field State to the dimension.
  14. Add the field Airport to the dimension.
  15. After Name, type State-Airport.
  16. Click Create..
  17. Click Done editing.

Adding the map to the sheet

The next step is to add a map to your sheet.

  1. In sheet view, click Edit Edit sheet in the toolbar.

  2. In a sheet, click to add a new visualization.
  3. Under Visualization, select Map.

Adding the State-County area layer

The first layer you add is an area layer to which you add the dimension State-County. In addition, you set the country as 'USA' to ensure we map to the state of Georgia rather than the nation of Georgia.

  1. Click Open advanced properties.
  2. Click Layers and click Add layer.
  3. Select Area layer.
  4. In Dimensions, click Add and select State-County.
  5. Click Location.
  6. Set Scope for locations to Custom.
  7. After Country, enter 'USA'.
  8. After Administrative area (Level 1), select State.
  9. Click Colors.
  10. Set Colors to Custom, select By dimension, and select 100 colors.
  11. Select Persistent colors.
  12. Adjust the Opacity slider to half opacity.
  13. Click Done editing.

Adding the State-City point layer

The next layer you add is a point layer. You add State-City as the dimension and then set the country as 'USA' and then set State as the first-level administrative area, as some counties cities in different states have the same names.

  1. From Layers in the advanced properties, click Add layer.
  2. Select Area layer.
  3. In Dimensions, click Add and select State-City.
  4. Click Location.
  5. Set Scope for locations to Custom.
  6. After Country, enter 'USA'.
  7. After Administrative area (Level 1), select State.
  8. Click Colors.
  9. Set Colors to Custom, select Single color, and select a color.
  10. Click Options.
  11. In Layer display, set Visible drill-down levels to Custom.
  12. Clear State.
  13. Click Done editing.

Adding the State-Airport point layer

The final layer you add to the map is a point layer to which you add the State-Airport field as the dimension. Qlik Sense recognizes IATA codes for placement, ensuring the airports are located in their actual position rather than just in their city.

  1. From Layers in the advanced properties, click Add layer.
  2. Select Area layer.
  3. In Dimensions, click Add and select State-Airport.
  4. Click Location.
  5. Set Scope for locations to Custom.
  6. After Country, enter 'USA'.
  7. After Administrative area (Level 1), select State.
  8. Click Size & Shape.
  9. From Shape, select Triangle.
  10. Click Colors.
  11. Set Colors to Custom, select Single color, and select a color.
  12. Click Options.
  13. In Layer display, set Visible drill-down levels to Custom.
  14. Clear State.
  15. Click Done editing.

Add the Resource filter pane

Finally, you can optionally add a filter pane containing the field Resource. This provides you with a list of the available historical sites as you make selections within your map.

  1. In sheet view, click Edit Edit sheet in the toolbar.

  2. In a sheet, click to add a new visualization.
  3. Under Visualization, select Filter pane.
  4. Drag and drop the field Resource as a

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!