How to Create Power BI Streaming Datasets Using Microsoft Forms and Power Automate

May 4, 2021
Power BI Streaming Datasets allow developers to create reports and dashboards that refresh in real time as a Power BI dataset is updated.

Mason Prewett, Business Intelligence at Key2 Consulting
By: Mason Prewett


 

What are Power BI Streaming Datasets?

Power BI Streaming Datasets allow developers to create reports and dashboards that refresh in real time as a Power BI dataset is updated. These datasets can be updated by various methods, such as using Power Automate or PowerShell.

This article focuses on updating the dataset using Power Automate. Power BI Streaming Datasets are only available in the Power BI service and not in Power BI Report Server.

At a current Key2 Consulting client, I used this solution to create a feedback form that allowed users to tell us how to improve our organizational SharePoint site. During a large presentation, I provided the form to the audience and let everyone see the results update in real time in a Power BI dashboard as the attendees answered the questions.

This is a great solution for displaying feedback/voting results in real time as the audience is participating. Waiting on the data to refresh or refreshing a page is not required.

This article will describe how to produce a solution similar to this.
 
 

Streaming Datasets Solution Overview

I will be creating a simple voting form for everyone’s favorite color. I will be using a Microsoft Form that will trigger a Power Automate flow that inserts the responses into a Power BI Streaming Dataset.

I will then be using Power BI Desktop to create a report for this dataset, and finally a dashboard to pin the report visual to. My solution will flow through these 0365 apps, as shown in the diagram below.
 

 
It may seem unnecessary to use so many different technologies to accomplish this, but this is the way 0365 apps are designed to work. Each technology plays an independent role in a solution rather than a single technology controlling everything. It took me a while to get used to this shift in the cloud, but it is much better once experiencing the benefits.
 
 

Creating a Power BI Streaming Dataset

I will be using My Workspace to create and publish all of the datasets, reports, and dashboards for this solution.
 

  1. Go to your workspace.
  2.  

  3. Click the New button and select Streaming dataset.
  4.  

     

  5. Select API as the source of your data.
  6.  
    A screenshot of choosing a dataset for creating a new streaming dataset in Power BI.
     

  7. Enter the name of the dataset and what columns it needs to have. It is important to turn on Historic data analysis or errors will occur when trying to connect to this dataset from Power BI Desktop. Click create. Copy the text provided in the textbox above the Historic data analysis and paste it into Notepad, as this may be needed later. If you forget this, you can always see this info by clicking the ellipses by the dataset and clicking API Info.
     

     

  8. The next screen will provide the API URL that is used to push data to this dataset. We will be using Power Automate to do this so the URL is not needed for our solution.
  9.  

  10. Your Streaming Dataset will now be listed in the workspace. I always have to refresh the page to see this.

 
 

Creating the Microsoft Form

  1. Open Microsoft Forms. Click the 9 squares icon (it’s called a waffle) in the top left of the Power BI service page. The MS Forms link is there.
  2.  

  3. Click New Form.
  4.  

  5. Give it a Name.
  6.  

  7. Click Add New->Choice.
  8.  

  9. Add choices, in my case it was colors.
  10.  

  11. This is all that is needed for the form. Here is what my form looks like:
  12.  

     

 

Create the Power Automate Flow

  1. Open Power Automate.
  2.  

  3. Click the 9 squares icon in the top left of the Power BI service page. The Power Automate link is there.
  4.  

  5. Click My Flows on the left navigation.
  6.  

  7. Click New Flow->Automated Cloud Flow.
  8.  

  9. Give it a name and type “form” in the trigger text box.
  10.  

  11. Select When a new response is submitted.
  12.  

     

  13. When the new flow loads, select the Microsoft Form that you just created for the Form ID.
  14.  

  15. Click New Step and type “form” in the search box.
  16.  

  17. Select Get Response Details.
  18.  

  19. Select your form again for the Form ID.
  20.  

  21. For Response ID, click in the text box and select the Response ID field that shows up on the right under dynamic content.
  22.  

  23. Click New Step and type “power bi” in the search box.
  24.  

  25. Choose Add rows to a dataset.
  26.  

  27. Select your workspace.
  28.  

  29. Select your Streaming Data Set for the Dataset field.
  30.  

  31. Select RealTimeData for the Table field.
  32.  

  33. My dataset field now shows up for the ColorVote that I created in step #4 of Creating a Power BI Streaming Dataset.
  34. a. If the dataset fields are not showing up here and it only shows a single field for Payload, follow these instructions for completing this step. I have seen a lot of inconsistency here, sometimes it shows the field by name and sometimes it shows just the Payload field. I have yet to figure out why and would love to hear from anyone that can explain this.

     

  35. Click in this text box and select the question from your form that shows up on the right under dynamic content.
  36.  

  37. The flow is now complete. Here is what my flow looks like:
  38.  

     

 
 

Create the Power BI Report and Dashboard

  1. Open Power BI Desktop.
  2. a. The visuals can actually be created in the Power BI Service by following these steps, but creating a report and then pinning it to a dashboard provides much more flexibility.

     

  3. Get Data->Power BI Datasets.
  4.  

  5. Search for the streaming dataset in your workspace. Select it and create.
  6. a. If you did not select Historic data analysis for your dataset, you will get an error loading this.

     

  7. Select your field as a Stacked Bar Chart.
  8. a. It may help to fill out the Microsoft Form a few times to have some data to view. Click refresh in PBI Desktop after filling out the form to see the results.

     

  9. Do any formatting that you want and publish to your workspace.
  10.  

  11. Reports do not support Streaming Data, only dashboards do. Your report will display this data as of the last time it was refreshed.
  12.  

  13. Go to your workspace and click the New button and select Dashboard.
  14.  

  15. Give it a name and then click Create.
  16.  

  17. This is all for the dashboard, so just go back to the workspace.
  18.  

  19. View the report that you published from step 5.
  20.  

  21. Hover over the visual and click the Pin Icon.
  22.  

  23. Choose the dashboard that you created in step 8, and click Pin.
  24.  

     

  25. Now go view the dashboard and the report will be visible.
  26.  

  27. Fill out the form and watch the dashboard updating results in real time.
  28.  
     

     
     

    Questions?

    Thanks for reading! We hope you found this blog post useful. Feel free to let us know if you have any questions about this article by simply leaving a comment below. We will reply as quickly as we can.
     
     

    Keep Your Business Intelligence Knowledge Sharp by Subscribing to our Email List

    Get fresh Key2 content around Business Intelligence, Data Warehousing, Analytics, and more delivered right to your inbox!
     

     


    Key2 Consulting is a data warehousing and business intelligence company located in Atlanta, Georgia. We create and deliver custom data warehouse solutions, business intelligence solutions, and custom applications.

Related Content
Understanding Power BI Filters, Slicers, & Highlighting

Understanding Power BI Filters, Slicers, & Highlighting

By: Mark Seaman   Power BI has three powerful features that make understanding and analyzing your data and visualizations more impactful: filters slicers highlighting In this blog post, we explore the functionality of these three features.   Power BI Filters...

How to Connect Power BI to Serverless Azure Synapse Analytics

How to Connect Power BI to Serverless Azure Synapse Analytics

By: Mason Prewett, Dean Jurecic, and Mark Seaman Introduction Azure Synapse Analytics (Synapse) is a powerful tool that makes connecting to data in Azure Data Lake Storage Gen2 (ADLS) as easy as traditional data sources like SQL Server. This article outlines the...

Microsoft Fabric – Starting a Trial

Microsoft Fabric – Starting a Trial

By: Mason Prewett, Dean Jurecic, and Mark Seaman Two Ways to Start Fabric Trial Fabric, the new AI-powered analytics platform by Microsoft, hosts resources in a workspace similar to Power BI. A new Fabric workspace can be created for this or an existing Power BI...