I have been playing with Business Intelligent software for sometime and discovered Microsoft Power BI. As BI suggests a collection of application to analyze and report from raw inputs for an organization, I am only interested the mapping part of it. Power BI let us add interactive maps and charts to any website and lets everyone play with it. Check out this simple example.

It’s been a long time since I am writing again. So my words may seem a bit weird sometime. Ok, Lets start with the webpage of Power BI. As you have already assumed, this is not a special trick, not something totally new or outstanding. BI applications have been around for many years, for instance SAP has been in this business since 80’s. Oracle has been in this business for decades. So nothing new about it. But embedding reports with interactive maps inside an iframe can be a lot messy. Consider putting all the different parts of it, a suitable data source, a DOM handler or javascript, a base map provider, some AJAX may be, all need to be placed together by an experienced programmer. With Power BI you don’t need to code at all, only focus to your data and visualization. Sweet isn’t it!

Let’s start. First register a free account to Power BI. Download the desktop application, install and open it.

You can either sign in to the software now or you can do that later. I leave that for now. Let us add our excel (.xlsx) file using Get data button. You can add data from many other sources.

The data has a longitude and latitude field which you will not be needing right now. While you import the data, you can make changes to it. PBI will create a copy of the data to let you edit it. After you finally Load the data, you’ll end up with a blank report page of PBI. Notice three button aligned on the left of the interface, Report, Data and Relationships. You can actually tell that the data are successfully loaded be looking at the Fields tab showing all the fields. Next it’s just drag and drop (notice they say “drag data fields here”).

We start by clicking the Map button (look like this – ) from Visualization group, a rectangular gizmo pops up. Drag ‘District’ field over the Location pane and ‘Population’ field to the Size pane. You will be immediately brought to Bangladesh. Don’t jump already, still more to come! Create two more chart, a ‘clustered column chart’ and a ‘donut chart’. The column chart will have ‘Division’ as axis and ‘Population’ as values. The donut will have ‘Population Density’ as values and ‘Division’ as details. You can always change the color and appearance of the chart from the section.

Remember to select the associated chart in order to add and edit its values. Resize and align the chart to make a composition. Save the report. Now we will need to publish it to our website. To do this hit the publish button on top. Log in if you haven’t already. The saved report will be visible to the report section of your account. Hover over any chart to see the data behind them. Click any section of the chart to immediately filter it’s effect to all the charts. Fun isn’t it!

Hit File > Publish to find the iframe code which you can use to embed the report to any website.

Use this link if you are thinking REST. PBI even has a Javascript API to interact with the report. You can embed to many other platform, check them here. If you don’t want to give away your data, try PBI Gateway.