A simple and fun guide to Microsoft Flow and Power BI

by ruthpozuelo Regular Visitor 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 yoshihirok Member
on ‎04-01-2017 10:58 AM

Nice.

 

I'm monitoring "Microsoft Flow" tweets in real-time by Microsoft Flow and Power BI Service - streaming dataset.

and monitoring temparature/humedity/wind speed each 15 minutes by these.

 

monitoring "Microsoft Flow" tweets:

- By Microsoft Flow, When new tweets, Send to Power BI streaming dataset.

- By Power BI Service, Dashboard and Reports for count 10 minutes/language/tweet texts/etc.

- By Power BI Mobile Apps, Check tweets status

 

Regards,

Yoshihiro Kawabata

by ruthpozuelo Regular Visitor
on ‎04-04-2017 08:01 AM

Thanks for sharing @yoshihirok!

/Ruth

by DavidMoss Member
on ‎04-15-2017 11:09 AM

Pretty cool demo Ruth. Thanks for sharing

by lemontree Frequent Visitor
on ‎04-21-2017 06:18 AM

Nice idea! I wonder what is the range of data one can get via flow and what are the alternative ways to get and refresh data from the web for e.g. financial markets price (stocks, indices, commodities etc). or even better i'd like to ask if there is a way to get data from an airport on arrivals and departures and create a link with power bi

by Power BI Admin chass
on ‎05-01-2017 07:43 PM

Great Article!

Next should be on putting a PowerApp in that dashboard to enable the drivers to make the orders directly....If you want help with that let me know!

by ruthpozuelo Regular Visitor
‎05-02-2017 10:43 AM - edited ‎05-02-2017 10:44 AM

Thanks Chuck! Yeah, I would love to create a PowerApp for my hard working drivers, but help doing that is needed. I havent used Power Apps yet.

/Ruth

by ruthpozuelo Regular Visitor
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 rejcom Frequent Visitor
on ‎05-06-2017 09:41 AM

HI, 

 

it is very good example..

BUt I have problem with temperature and with time in power BI... this temperature is not real.

 

What can I do to repair it...

 

Thanks 

by ydesta Visitor
on ‎05-17-2017 08:31 AM

Thank you for sharing Ruth. Creative idea. I used to study at KTH Stockholm ten years ago. I vividly remember the sound of Hemstad Ice Cream during the beautiful Swedish summer. Now, I live and work  in Maryland USA. Power BI has become my favorite tool, I'm BI consultant for a Senior Care Company in Rockville, Maryland.

 

by kiasu New Member
on ‎07-31-2017 01:43 AM

thanks .. good example . thumb up

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

Excellent

by ruthpozuelo Regular Visitor
on ‎08-14-2017 12:09 AM

@rejcom Hi!

What do you mean with " the temperature is not real?"

/Ruth

by ruthpozuelo Regular Visitor
on ‎08-14-2017 12:11 AM

@ydesta Hi!

Extra fun that the blog post brought back memories from hot and sweet swedish summers! Smiley Wink

 

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?