Saturday, April 27, 2019

How to use real-time data in Power BI using Microsoft Flow


Using Microsoft flow and Power Automate we can easily use Power BI Real-time data sets. What is required is as follows:


1.       An Office 365 free 30-days trial or subscription.
2.       Microsoft Flow
3.       Microsoft Flow
4.       Power BI Free or Pro edition.

What is our Business scenario?


Contoso Inc wants to hold an event and sends 1000 participants a simple digital survey. They ask about 3 questions i. What Microsoft TECHNOLOGY they are interested in, the number of years of EXPERIENCE they have in that technology and the LOCATION they are from.

Contoso wants REAL-TIME dashboard whenever any participant submits the survey.  Specifically, Contoso wants the COUNTRY they are from, and participants their number of EXPERIENCE.

The technology we can use to achieve this requirement

We can use MICROSOFT FORM to capture digital form. The Microsoft Flow which will process our questions in the Microsoft flow. Next,  we can use set up Power BI Push dataset and use Power Visuals to achieve this.

This is a sample of our Microsoft Form 


Step1: Start Microsoft Flow

  1. Microsoft Flow has many templates that we can leverage.

    for our case, we will create Flow from scratch
  2. Create from blank 
  3. Click on Create from blank

  4. We will choose Microsoft Forms as our Trigger in the Flow.


     
  5. It will limit me the number of actions and trigger which are available to our disposal.
  6. We have only ONE trigger which is nice. Click on “When a new response is submitted”.


  7. As I have single sign-on turned on, I will be presented with Form ID. Choose the Form which I have created

  8. Next, click on New step

  9. It is storing all the information as an array within Flow. When a person submits the form, it will be a trigger.  So, if Alex submits the 3 questions in the survey, Flow will process all the 3 questions in the “Get response details” action.

  10. Select the Form which we created in the previous step and in the “Response Id”, under the Dynamic content select the List of response notifications Response Id

     

  11. Now it has created some new elements and each response is wrapped by for each loop.

    Step 2: Streaming Data using Power BI

  12. Go to Power BI and created a new app workspace. Name it as 25 Apr 2019 Streaming Data set Demo. It won't have any dashboards, reports, etc.

  13. This is the landing page.  Click on the Skip

  14. Click on Create option and then click on Streaming dataset.

  15. We will leverage API and click NEXT

  16. Now it has Power BI has a very intuitive user interface (UI) which just enter the values. Types the values as follows

    Technology, Experience, and Location.

    Toggle ON for Historical data analysis

  17. A new dataset has been created.

  18. It has the same look and feel just like your Power BI Desktop.

  19. Firstly, we will create a table visual here.

  20. Drag all the fields to the table.


      
  21. Bump the column headers and Value size.



  22. Make alternate rows in Style property

  23. Turn off Total


  24. Drag the MAP visual and alight towards the top right.

  25. Drag Location field onto the Location property of the map.

  26.  Drag the Technology field onto the Legend property of the map.

  27. And finally, drag Experience field onto Size property of the map.

  28. The last chart is stacked column chart and drags it to report canvas.

  29. Drag Technology onto Axis property, Experience onto Legend property and Experience onto Size property.

     
  30. Save the report as 25 Apr 2019 Survey Response

     
  31. Next, pin the visuals individually to Dashboard 
  32. Do the same for TWO more visuals.
  33. Now, our Dashboard is ready.

  34. Note that Streaming and Pubnub works only for custom streaming data as shown.



    and we can’t use ANY of the visual that we are doing for this example

    Step 3: Complete the Flow 

  35. Click on Add an action in Flow just below the  When a new response is a submitted trigger



  36. Next, Add rows to a data action


  37. Choose appropriate workspace

  38. Select the Dataset

  39. The table will be RealTimeData.
  40. Next, Flow dynamically shows the Forms data fields.



  41. From Technology data field, choose the appropriate item from MS Forms.

  42. Select other Form fields as shown:

  43. Click on SAVE button on the Flow and you will see the Run History when people are submitting the MS form data.



    Step 4: View the Power BI Dashboard

  44. Dashboard display real-time data when anyone submits a form

  45. The report can be refreshed by using a Schedule.



    Hope you find this blog post useful 
--Aroh Shukla 


No comments:

Low Code Reimagined with AI + Copilot Pitch Deck - Copy Copilot day (Virtual) - 2023

 Hi All,  I presneded a session at Pune UG on Low Code Reimagined with AI + Copilot Pitch Deck.  Video is at this address  https://www.youtu...