{"id":110800,"date":"2017-02-05T01:25:41","date_gmt":"2017-02-05T09:25:41","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-automate\/fotw-weather-in-powerbi\/"},"modified":"2017-02-05T01:25:41","modified_gmt":"2017-02-05T09:25:41","slug":"fotw-weather-in-powerbi","status":"publish","type":"power-automate","link":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-automate\/fotw-weather-in-powerbi\/","title":{"rendered":"Flow of the Week: Show real-time weather data in Power BI"},"content":{"rendered":"
Last week we announced that you could stream data real-time from Microsoft Flow to Power BI. Read Sirui’s full blog post here<\/a> for the announcement and a full walkthrough for gauging Twitter sentiment with Flow and Power BI<\/a>.<\/p>\n For this week’s Flow of the Week<\/em> we want to highlight another Power BI and Flow streaming scenario brought to us by Kawabata Yoshihiro\u00a0here<\/a>. This flow will populate a tile on a Power BI dashboard showing weather for a location you choose.\u00a0<\/p>\n If you already use Power BI, sign in, otherwise you can sign up for Power BI for free here<\/a>. Once logged in, select\u00a0Streaming datasets<\/strong>\u00a0in the left navigation inside your workspace:<\/p>\n <\/p>\n Next, you will select\u00a0Add streaming dataset<\/strong>\u00a0in the command bar:<\/p>\n <\/p>\n In the New Streaming Dataset panel select\u00a0API<\/strong>:<\/p>\n <\/p>\n Now you will name your dataset’s values and their type. For this example, you can have fields like\u00a0time<\/em>, temperature<\/em>,\u00a0windspeed <\/em>and humidity<\/em>. For the time field select DateTime <\/strong>and select Number <\/strong>for the other fields:<\/p>\n <\/p>\n Congratulations, you have now set up your streaming dataset that will receive the data from flow!<\/p>\n You will create a flow from scratch to stream the data. Start by going to your My Flows page<\/a> and selecting Create from Blank<\/strong>.<\/p>\n The first step in a flow is to add the trigger. This flow will be triggered based on a schedule – for example, every 15 minutes. Select\u00a0Schedule<\/strong>\u00a0in the trigger services and then\u00a0Recurrence:<\/strong><\/p>\n <\/strong><\/p>\n Next, add a step to get the current weather. You can find that step by searching inside of the Choose an action<\/strong> card. Fill in the Location you want weather for and the units you want the data in. The final step in the flow is\u00a0Add rows to a dataset<\/strong>:<\/p>\n <\/p>\n Inside this step you will select your Workspace<\/strong>, Dataset<\/strong>, and then table (which will always be RealTimeData). Pass in the data from the weather step you want to use by selecting Add Dynamic Content<\/strong>. For the time field, you can type in: 20@{utcnow(‘yy-MM-ddTHH:mm:ssK’)} which will populate the time in a format that Power BI expects. Once you have configured the step, create the flow and it will start running.<\/p>\n The part of this tutorial is to add the tile to your dashboard. You can create a new dashboard or use an existing on in Power BI. Select\u00a0Add tile<\/strong>\u00a0in the command bar:<\/p>\n <\/p>\n Select\u00a0Custom Streaming Data<\/strong>\u00a0and then the dataset that you created in the first part of this tutorial. Then, you will configure your tile:<\/p>\n <\/p>\n For the tile, you will select the axis as the time<\/b>\u00a0series, and then display whichever weather measure you want as the values on the chart. You should now be all set, and see data appear on your dashboard in real-time:<\/p>\n <\/p>\n In just a few minutes you have been able to set a new streaming data source for Power BI without writing a single line of code. We recommend also checking out this scenario for streaming Twitter data to a Power BI dashboard<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"Set up the streaming data source<\/h2>\n
Set up your flow<\/h2>\n
Add the tile to your dashboard<\/h2>\n