Data Studio Cannot Sum Numbers to Chart

2.6k views Asked by At

I need help to create a chart of sum multiple sources in Google Data Studio. My sources are:

  • Google Search Console: Clicks
  • Google My Business: Phone Calls, Website Visits, and Direction Requests

Problem

The chart is not SUM-ing those numbers. See image below, the green line Combined Actions should be the SUM of all the 4 metrics I mentioned above. FYI I renamed the parameters to help me differentiate:

  • Site Search Clicks = GSC Clicks
  • Tebet Phone Calls = GMB Phone Calls
  • Tebet Website Visits = GMB Website Visits
  • Tebet Direction Requests = GMB Direction Requests

data studio chart not summing

This is the formula I use

SUM(Clicks+Phone calls+Directions requests+Website visits)

enter image description here

This is the data source

enter image description here

I thought it was the number format that was corrupted, but if that's the case then why the individual chart is shown correctly? I can also draw each individual chart using SUM(Clicks), SUM(Phone calls), etc.


For Your Information, I have another chart in this page that works by summing:

  • Google Search Console: Impressions
  • Google My Business: Direct search impressions So those 2 data metrics are working well. enter image description here

Any help would be appreciated. Also let me know if you need any more context on this question. Thank you.

1

There are 1 answers

0
Nimantha On

The issue is due to having NULL values (if there is no data for a single Metric at a single date in the SUM function, then that entire date row will be displayed as 0 in the Time Series chart); one approach is to incorporate the IFNULL function below which treats NULL values as the numeric literal 0:

SUM(IFNULL(Clicks, 0) + IFNULL(Phone Calls, 0) + IFNULL(Directions Requests, 0) + IFNULL(Website Visits, 0))

Editable Google Data Studio Report (Embedded Google Sheets Data Source) and a GIF to elaborate: