A fun guide to using Power BI with Microsoft Flow

This post was originally written by Ruth Pozuelo for the Power BI Community Blog.


In Sweden there is a company called Hemglass that delivers ice cream to people’s homes in refrigerated vans. This company is very well known in Sweden, not only for its ice cream, but also for the music the van’ play to alert people they have arrived at their door. If you are curious about how it sounds, you can check it out here.

We are going to enter this market and try to beat them at their own game and for that we are going to use Microsoft Flow and Power BI.

Here is the game plan:

Using Flow, every morning we will collect the weather forecast and send it to our drivers using Office 365, so they know how much they should stock on their vans. We will, at the same time, send the data to Power BI so we can store it in our records. We can, after a while, compare the weather data with the sales on our vans and develop a stock strategy that is more accurate.

To do this, you don’t need to write a single line of code. Any business owner can do it.

If you prefer, you can follow along on this video too:

Let’s begin

Create a storage place in Power BI for storing the data

The first thing we need to do is to create a “container” in Power BI to store the weather data. For that, login to Powerbi.com and scroll to the bottom where you see “Streaming datasets”:

On the right-hand corner, click on Add dataset:

Give a name to your dataset and add the fields you want to store.

As we havent looked at what fields are available yet, you can create here the ones you would like to have and then correct accordingly when you see what is available from the weather service.

Check that all your fields are in, activate “Historic data” and click Done.

Create your first Flow

Now, lets navigate to flow.microsoft.com. Create an account if it is the first time you login. There is a free plan available for you to try the service.

We are not going to create a flow from scratch if we don’t have to. First of all, check if there is a flow available similar to what you want to achieve and modify it instead.

We search for “weather” and the following flows appear:

The one we want to reuse is: Get a daily notification with the weather forecast, so we click on it.

Click on Use template and continue and the service will be available for you to edit:

Lets edit the Recurrence Step. Here we only need to add the location (Stockholm ) and the time we want this to start working and also the time it will be sent.

For the next step, we need to add the location of the weather station, in this case, Stockholm, Sweden and we will change the units to metrics.

We dont need the last step, so we will delete it:

and instead we will create a new step:

Search for the Power BI service, and click on Add rows to a dataset:

Configure the service

  1. Select the workspace where you published the streaming dataset in the first steps
  2. Select the name of the dataset: StockholmICE
  3. Select the table: Realtimedata
  4. Click on the Location cell and
  5. select Location from the fields available in the weather service and repeat with Date, Temperature and Conditions.

Now we are going to configure the email to our drivers. Choose Office 365 as a service and select Send an email from the list:

Configure the email as below:

and finally we are ready to create our flow:

Just to verify that everything has gone well, click on Manage:

and check that the flow was created and it has run already:

Check your data and start analyzing

Now we can finally check if we are getting any data. Lets go to powerbi.com:

and check our email:

Everything is up and running, so we are ready to launch!