# 2021 Week 43 | Power BI: Maps with a Distance Radius

## Introduction

It’s the final week of mapping month! This week we are plotting points on a map within a selected radius. It’s common to want to see locations, such as stores or restaurants that are nearby to a selected location. This week we are exploring one way to do that in Power BI. This involves a fun bit of DAX and some conditional formatting.

This week we are mapping Dutch Bros Coffee locations. This is a coffee chain based in Oregon, USA that has locations in about 13 states throughout the country. I enjoy their cold brew, but they have many hot, cold, and frozen drink options.

## Requirements

• Retrieve the Dutch Bros location data and the list of cities from data.world
• Create a map visual that plots the Dutch Bros locations using longitude and latitude.
• Use the “CityLatLong.xlsx” table to populate state and city slicers.
• Create a DAX calculation that uses the haversine formula to calculate distance from the selected city in the slicers to each Dutch Bros location. (I chose to use kilometers, but feel free to do miles if you prefer.)
• Create a slicer to allow users to filter on distance from store locations to the selected city.
• Add a visual (I used a table) to list the store addresses and the distance from the selected city.
• Configure the map and table so they only show locations within the selected distance radius. (Hint1, Hint2)

## Dataset

This challenge uses data provided on data.world. You can use the data.world connector in Power BI (recommended) or download the Excel file to your local machine. You will need to log in to data.world to retrieve the data, but accounts are free.

## Share

After you finish your workout, share on Twitter using the hashtags #WOW2021 and #PowerBI, and tag @JSBaucke@MMarie, @shan_gsdAlso make sure to fill out the Submission Tracker so that we can count you as a participant this week in order to track our participation throughout the year.

## Solution

### 2 thoughts on “2021 Week 43 | Power BI: Maps with a Distance Radius”

1. Hi, John. You can change the radius to 3956. This makes the units miles instead of kilometers.

Scroll to Top