A simple and fun guide to Microsoft Flow and Power BI

by ruthpozuelo on ‎03-30-2017 09:37 AM

In Sweden there is a company called Hemglass that delivers ice cream to people’s homes in refrigerated vans. This company is very well know in Sweden, not only for its ice creams, but also for the music the van’s 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:

 

stockholm ice.png

 

Using flow, we will collect every morning the weather forecast and send 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. J

 

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

 

youtube.png

 

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 in Powerbi.com and scroll to the bottom where you see “Streaming datasets”:

 

1. streaming datasets.png

 

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

 

2. add streaming dataset.png

 

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.

 

3. conf streaming dataset.png

 

 

 

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

 

3. conf streaming dataset2.png

 

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:

 

5. flow templates.png

 

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:

 

 

6. use template.png

 

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.

 

7 edit recurrence.png

 

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.

 

8 edit weather.png

 

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

 

 

9 delete push notification.png

 

and instead we will create a new step:

 

10 add action.png

 

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

 

 

11 add Power BI.png

 

Now we need to 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.

 

12 config power bi.png

 

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:

 

 

13 send an email.png

 

Configure the email as below:

 

 

14 configure email.png

 

and finally we are ready to create our flow:

 

 

15 create flow.png

 

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

 

 

16 manage din flow.png

 

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

 

 

17 flow created.png

 

Check your data and start analyzing!

We are done!!

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

 

 

17 flow created.png

 

and check our email:

 

18 email sent.png

 

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

 

 

Let me know if you create a flow and connect it to Power BI. Love to hear about other examples.

 

 

 

 

Comments
by ruthpozuelo
on ‎05-02-2017 10:47 AM

@lemontree ,

There are all kinds of data sources available in the Flow website, have you checked them out?

by CABIRDUK Frequent Visitor
on ‎08-08-2017 12:10 AM

Excellent

by jatin24 Frequent Visitor
on ‎10-29-2017 05:11 PM

I cant see the option for 'Streaming Datasets' Is this only available in the Pro License?