This is currently the hot topic in India - who will win the 2019 election of India and become Prime Minister. Although, 90% of people know who will come again .
This subject gave me an opportunity to use my favourite tools, Microsoft Flow, Power BI, and Microsoft Form.
Our aim here is to create a flow which is responsible for capturing the response from Microsoft Form and send it to Power BI stream dataset.
Or we can say the give live stream response of Microsoft form using Microsoft Flow to Power BI and show live trend dashboard by passing stream data to Power BI.
Isn’t it interesting?
I am so excited So, let’s get started.
Prerequisites: Surely, you need the following accounts to work further:
- Microsoft flow: You need Microsoft Flow account for this, you can use http://flow.microsoft.com/ to create an account.
- Microsoft Power BI: You need Microsoft Power BI account for this, you can use http://app.powerbi.com/ to create an account.
- Microsoft Form: You need Microsoft Form account for this, you can use https://forms.office.com/ to create an account.
All good now, you have all the required tools.
The first step here is to create a form so, just log in to Microsoft Survey form and create a sample Survey form as shown in the below figure:
Great, so we have created our Microsoft Survey form which you can access via the link.
Here, as mentioned in the image, make sure you click “Anyone with the Link can respond” to make it publicly available.
Great, so far so good, we have created our first step.
Now, move to Microsoft Flow and after login, create a New button and choose to create blank flow.
In the next step, search Microsoft Flow as shown in the below figure. We want to collect the response. So, whenever a new response is submitted, our flow with trigger.
Now, when you click on “When a new response is Submitted” option (if you are already logged into Microsoft form), it will show all the forms which you have created.
As shown in the figure, we are selecting “Indiandotnet- Prime Minister 2019 of India”.
Here, as we know, there can be a bunch of responses submitted using the form.
So, we need to capture each individual response and send to power BI stream database. For this, we will add Apply to Each option and in that, select Get Response detail in the action.
Now, in the next step, we will configure it as shown in the below figure, so we are going to pickup each individual response.
So, our first step is created.
Now, we need to pass the submitted response to Power BI but before that, we have to create Streaming dataset as we created in our earlier post as well.
Login to app.powerBI.com and create a stream dataset
in your workspace as shown in the below figure:
After clicking the streaming Dataset
as shown in above figure, select the API option:
Now, in the next step, we will define the dataset
in which we will have the same fields which we are capturing in the form.
In our example, we are capturing 2 questions which are:
- your Prime minister
- your location
Just define the fields as mentioned above. You can see that I have created the same as shown in the below figure:
Just click on Create button to proceed further:
Once you created the dataset
in the next step, we will create a dashboard. Although we don’t have any data yet, but we can at least define it.
Just, create a report by clicking the option as shown in the below figure:
When you click, create report option, you will get report editor - here, we are choosing 2 simple graphs:
- Bar Graph – which will show number of votes for each individual candidate (option which we gave in the Microsoft form)
- MAP – from where we got the response across the globe.
Now, we are done with the Power BI stream database, move back to Microsoft Flow and configure the next step which we left.
Here, we are going to add Add rows to a Power BI dataset as shown in the below figure:
Now, just configure the Power BI as shown:
So far, so good. We are done with our configuration. Just save the Flow and hit test run.
You will see that all steps are clear. Now, check the Power BI dashboard which we have created.
After configuring correctly, just publish the Survey and let the people fill it.
I did the same and shared the survey on Facebook.
Now, let’s move to power bi dashboard and check the graph there.
Wow, we are able to see all the live responses.
People voted from different locations to their Primary Minister and as you can see Shri Narendra Modi is our favourite and all the people voted for him.
Please let me know how you like this post.
Enjoy learning & sharing Microsoft Flow, Microsoft Form & Power BI.
A humble request to all readers who are Indian and eligible to vote. Please do cast your vote. Your vote is very important.
Choose a capable leader in this election whom you can trust to speak your voice logically.
India will progress, there is no doubt, but choose a leader who will be with India, not with terrorists and tukde tukde gang.
JAI HIND!
BHARAT MATA KI JAI!