Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / productivity / Office

Indian Prime Minister 2019 Live Poll – Analysis using Microsoft Form, Microsoft Flow and Power BI Live

5.00/5 (1 vote)
30 Mar 2019CPOL5 min read 4.5K  
Live Poll – Analysis using Microsoft Form, Microsoft Flow and Power BI Live

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 Smile.

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:

  1. Microsoft flow: You need Microsoft Flow account for this, you can use http://flow.microsoft.com/ to create an account.
  2. Microsoft Power BI: You need Microsoft Power BI account for this, you can use http://app.powerbi.com/ to create an account.
  3. Microsoft Form: You need Microsoft Form account for this, you can use https://forms.office.com/ to create an account.

Indiandotnet_Microsoft_Form_1

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:

Indiandotnet_Microsoft_Fom_2

Great, so we have created our Microsoft Survey form which you can access via the link.

Indiandotnet_Microsoft_Form_3

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.

Indiandotnet_Microsoft_form_flow_4

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.

Indiandotnet_Microsoft_Form_Flow_5

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”.

Indiandotnet_Microsoft_Form_Flow_6

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.

Indiandotnet_Microsoft_Form_Flow_8

Now, in the next step, we will configure it as shown in the below figure, so we are going to pickup each individual response.

indiandotnet_Microsoft_form_flow12

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:

Indiandotnet_Microsoft_Fow_Power_BI_8

After clicking the streaming Dataset as shown in above figure, select the API option:

Indiandotnet_Microsoft_Flow_Power_BI_9

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:

  1. your Prime minister
  2. your location

Just define the fields as mentioned above. You can see that I have created the same as shown in the below figure:

Indiandotnet_Microsoft_Flow_Power_BI_10

Just click on Create button to proceed further:

Indiandotnet_Microsoft_Flow_Power_BI_10

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:

Indiandotnet_Microsoft_Flow_Power_BI_12

When you click, create report option, you will get report editor - here, we are choosing 2 simple graphs:

  1. Bar Graph – which will show number of votes for each individual candidate (option which we gave in the Microsoft form)
  2. MAP – from where we got the response across the globe.

Indiandotnet_Microsoft_Flow_Power_BI_13

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:

Indiandotnet_Microsoft_Form_Flow_10

Now, just configure the Power BI as shown:

Indiandotnet_Microsoft_Form_Flow_11

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.

Indiandotnet_Nerdtechies_flow_14

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.

Indiandotnet_Microsoft_Flow_Power_BI_15

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!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)