Analyze Facebook Reactions with Power BI

Earlier this year, Facebook introduced the new reactions Love, Haha, Wow, Sad and Angry.

Screenshot_11

In my blog post here, I shared with you the implications of the new reactions on your Excel/Power BI reports. The good news: On April this year Facebook released version 2.6 of their Graph API here, which allows you to read all the Facebook reactions from personal, page or app posts.

So here is a step-by-step tutorial for loading your profile post reactions to Power BI (You can perform the same steps with Excel using Power Query add-in in versions 2010 and 2013, or using the Get & Transform section in Data tab of Excel 2016).

A note for newcomers: To start, you can download Power BI Desktop here. Its a free Microsoft BI authoring tool which allows you to create stunningly beautiful dashboards with the latest Power Pivot, Power Query and Power View technologies (which are also avaiable on Excel), and allows you to publish these dashboards to Power BI, and consume the dashboard on any device.

Launch Power BI Desktop, and click Get Data. In the Get Data dialog, select Online Services, click Facebook and then click Connect.Screenshot_1

Click OK in the Facebook dialog.Screenshot_2

Follow the Facebook login/permission approval process, till the Query Editor window opens.

If this is the first time you use Power BI Desktop, or you don’t have the formula bar visible, go to View tab and check Formula bar.Screenshot_13

In the formula bar, change the existing formula and change the version from “v2.2″ to “v2.6“, then add the suffix “/posts?fields=reactionsScreenshot_3

Click the little icon at the right side of the header column reactions. In the expand pane, unselect all columns, then select the columns name and type and check Use original column name as prefix, then click OKScreenshot_4

Click the little icon at the right side of the header column object_link. In the expand pane unselect all columns, select the column created_time and then uncheck Use original column name as prefix, and click OKScreenshot_6

Change the type of column created_time to Date/Time bu selecting the column and clicking Data Type: Any –> Date/Time in Home tab.Screenshot_7

Rename the query to MyPostReactions inside Query Settings pane as highlighted in this screenshot:

Screenshot_8

In the Query Editor Home tab, click Close & Apply.Screenshot_9

You can now create cool visuals by selecting the visual items in the Visualizations pane, and drag and drop the fields from MyPostReactions.

Screenshot_14.png

Finally, I prmoised to mention all my friends who reacted to my post here as part of the prepartion of this blog. If you would like to see your name in this public dashboard, click on your favorite reaction to this post, and then comment below.

That’s it. I hope you enjoyed this trip.

Special thanks to:

Screenshot_17.png

 

1 Comment

  1. Pingback: Facebook Post Reactions to Trump and Clinton in Power BI - DataChant

Leave a Reply