Open navigation

How to add a count of posts from Facebook Insights to a Data Studio report

While there’s no default metric for counting Facebook posts in the Facebook Insights data source, you can still import this value to Data Studio with a custom calculated field.


Instructions

  1. Open a report in Data Studio.
  2. Click any report element to open Supermetrics.
  3. Click the Edit icon next to the Facebook Insights data source.
  4. Click Edit connection.
  5. Click Add a field to bring up the calculated field window.
  6. Add a meaningful name in Field Name.
  7. In the Formula field, add this formula:

    SUM(CASE WHEN Post ID IS NULL THEN 0 ELSE 1 END )

  8. Click Save.

You can now add this as a metric in your reporting.


Troubleshooting

This custom field isn’t a true metric — Facebook still treats it like a “Post ID” dimension value.


For that reason, you’ll see an error if you try to use it without any other metrics (in a scorecard, for instance).


To solve this, use this formula in the custom field instead of the one described in the steps above:

  • Count(PostID)+TotalImpressions-TotalImpressions


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.