An update for the brave analysts of Facebook Insights and #PowerQuery

Update: 6/6/2016: This blog post provided a workaround to a Facebook bug which had been recently fixed.

If you tried my last Power BI tutorials here and here, and you are authoring reports that require the extraction of Facebook Page Insights, you may find today’s update useful.

So recently Facebook introduced the new reaction buttons. Unfortunately as it seems, the new features introduced new bugs in Facebook Graph APIs. On my last post I mentioned a bug in the counting of the new reactions (e.g. Love, Sad & Angry). But today I would like to focus on a new painful bug that makes my previous dashboards nonoperational.

The bug here, which was confirmed by Facebook, causes the insights/page_fans_country entry point to return no data (And my gut feeling tells me that there are probably dozens more related bugs).

Luckily, there is a simple workaround for my Facebook dashboards (the workaround is already implemented and is available here. Please don’t download the main file. Scroll down till you see the link at the Update section).  You should note that for some typical Facebook API issue, the data will be limited in its time span, and for certain pages (e.g. Tableau) data will only start showing from a specific date (See the following screenshot).

Screenshot_45

To fix the dashboard, I performed the following changes (The base line of the queries were published on my blog here):

Edit the query SincePeriod and change the time period from 90 to 60 days.

Screenshot_43

Edit the M expression of the function query GetInsightsByPage and change the Facebook API version from 2.5 to 2.2 or 2.3.

Screenshot_42

Close the modified queries and perform a refresh.

You can now download the dashboard file here. You will love it 🙂

On my next posts on Facebook Insights, I will show you how to create the same dashboard on Excel (Relying here on my friends from Excel team to release Excel version with the latest Power Query bits).

 

1 Comment

  1. Pingback: Analyze Facebook Insights with Excel – Data Chant

Leave a Reply

Your email address will not be published. Required fields are marked *