Categories
Power BI

Power BI and data from web URL address as JSON

Power BI has great built-in feature for getting data from a web address. Let’s use the open data example from Helsinki city buildings. You’ll find the building information at: https://www.avoindata.fi/data/fi/dataset/helsingin-rakennukset. Later in the page, you’ll find a link:  https://kartta.hel.fi/ws/geoserver/avoindata/wfs

Find the part “outputFormat”. You’ll learn that you can get the content in many forms, JSON being one of them. Next, try to find FeatureTypeList in the source.

<Name>avoindata:Rakennukset_alue_rekisteritiedot</Name> This is the one you want. Next the only thing you need to do is type this to your browser. Note the GetFeature, typeName and outputform parameters.

https://kartta.hel.fi/ws/geoserver/avoindata/wfs?version=1.1.0&request=GetFeature&typeName=avoindata:Rakennukset_alue_rekisteritiedot&outputformat=json

The Power BI part – get the data in json format

How to get data for Power BI from web URL

Total Time: 5 minutes

Choose get data

Open Power BI and Choose Get Data.

Type “web” to the search field on the left

You’ll find an option for web. Choose it. Click Connect.

Copy and paste the URL above

You could have options for headers, but there’s no need to give any header information here, choose Basic and Go.

Click list

Next, another window opens. You want to get a list of records. It will take some time now. Click “To Table” button on the left corner. Click Ok.

Choose the little arrow to spread the columns.

You should have a nice list of columns.

Choose the little arrow next to the properties column

This will “unpack” the properties object.

Click OK

when ready

Check and change datatypes

You might have to adjust the datatypes. Luckily, you have a list in here, what to expect.

Click Close & Apply

Save your changes by choosing close & apply from the top left corner.

There you have it! Now you can start dragging the columns to the canvas.

Leave a Reply

Your email address will not be published. Required fields are marked *