Power BI – Map Control

This post is part of Algorütm Podcast: Low-Code No-Code episode:
Audio / Video

When you have Location Data in your database, it is easy to visualize it using Power BI Map Control.

For a project overview, you can take a look at intro: Garmin Location Tracking using Power Platform.

For this demo, we are going to assume that you have a database with Longitude and Latitude information in it. If you don’t have it, you can take a look how you can create one from KML feed, using Power Automate (or Azure Logic App):
Data Processing Pipeline – Power Automate and Azure Logic App

Let’s start 🎬

Power BI

Go to Power BI and download Power BI Desktop. I wish one day Microsoft will introduce a Web Power BI client that can be used for creating new visualizations… Till then – we need to use Power BI Desktop App.

Import Data

Start the app, and this is what you should see:

Let’s set up a data source. Click on Get data / More

Choose your data source – in our case, it is Cosmos DB

Go to Azure Portal to get the needed information. For now, we need only URL:

URL you get from Cosmos DB overview page in Azure Portal

Hit OK in Power BI, and let’s go back to Azure Portal, to get the super secret key.
Go to Keys section and fetch your
Read-only Primary Key

Paste it in Power BI and hit Connect

Select your table and hit Transform Data

This is the place where you can take any data from the DB that you need.
For the simplicity of this demo, we are going to take just Location Info

Then again expand the record

Select coordinates

In our case: Longitude, Latitude and Altitude are in the same column
24.74512687884271144866943359375,59.441069327294826507568359375, 26.6000003814697265625
We need to split it.

Right Click the column / Split Column / By Delimiter

Select Comma and hit OK

Right Click again / Rename Columns

And that is it. We are ready to import the data.
Hit Close & Apply

You are now back to the homepage. And you should be able to see your data

Map Control

Select Map and resize it

Drag data field to appropriate Map fields

And that’s it 🙂

If you want, you can now customize how map looks and behaves


Once done, hit Publish button

Once done, click on
Open ‘map.pbix’ in Power BI

Here, in Power BI Web, you can choose how you want to publish your visualization further

Update Data in Real-time

If you are using Power Automate or Azure Logic App, you can trigger data update whenever dataset changes.

At the end of your flow, add Power BI step

Web Page

Now that our map is ready, let’s see how we can embed it in a web page:
Publish Power BI Visualization and Create Site with Power Apps