Learn business growth with Google Analytics 4 Forums Google Analytics 4 Troubleshooting the issue with data not updating in Looker Studio when selecting a date range in BigQuery

  • Troubleshooting the issue with data not updating in Looker Studio when selecting a date range in BigQuery

    Posted by Theo on 15 April 2023 at 5:27 pm

    Hey there, I’m having a tiny issue syncing up my data from BigQuery to Looker Studio. Just to give you a picture, I’ve set up the data source and even a pie chart with a date range filter. Everything looks peachy until I try to change the date range, the data percent doesn’t budge.

    Here’s a snapshot of what I’m dealing with:

    – for the data source:
    What my data source setup looks like

    – for the pie chart:
    What my pie chart setup looks like

    My data actually ships from Google Analytics 4 (GA4). The flow’s pretty simple: GA4 –> BigQuery –> Looker Studio. Weirdly enough, when I plug the GA4 data directly into Looker Studio (skipping BigQuery), the data shifts when the date range changes.

    Another thing to consider, my BigQuery data is neatly sorted out based on dates. Here’s what that looks like:

    How my data is organized in BigQuery

    Maybe it’s a tripping point? I’m kind of stuck on how to fine-tune it though.

    Any tech wizards out there who can figure out what went haywire here and toss me a lifeline? Thanks in advance!

    Isaiah replied 1 year, 5 months ago 3 Members · 2 Replies
  • 2 Replies
  • Nguyen

    Member
    26 May 2023 at 8:22 pm

    Sure thing! Let me break down what’s happening here. Your data pipeline from Google Analytics 4 (GA4) to Looker Studio via BigQuery is neat. When you directly connect GA4 to Looker Studio, your date range filter works perfectly which shows your GA4 data is correctly configured.

    The tricky part is when you add BigQuery to the mix – something’s not clicking right. Now, let’s focus on the BigQuery part.

    The data in BigQuery is stored in ‘STRING’ format or ‘Integer’ formats. In order for Looker Studio to recognize it, especially for date ranges, we need it in ‘DATE’ format. That’s probably where the signals got crossed!

    Here’s the fun part! Time for a little magic trick to transform all those numbers and characters into a date format that Looker Studio will understand and love:

    Step 1: Open Looker Studio. Create a new data source and choose ‘Custom Query’.
    Step 2: Use this magical spell (aka SQL code):

    
    SELECT
      event_name,
      PARSE_DATE('%Y%m%d', event_date) as event_date, // This turns strings to Date format
      platform,
    FROM
      yourProject.analytics_0000000.events_*
    

    Voilà! Your data is transformed! If you want to pull in more dimensions or metrics, you just need to tweak this query a bit.

    Now, with your data transformed into the ‘DATE’ format, select the pie chart again in Looker Studio. Ta-da! Your date range dimension will show up.

    Not too difficult, right? Have fun with your newly transformed data!

  • Isaiah

    Member
    4 June 2023 at 7:36 pm

    It seems like the date filter in Looker might not be linked up correctly to your BigQuery data. I’d recommend checking how you’re passing date parameters from Looker to BigQuery, just to make sure they’re matching up. Another thing is to consider if Looker is interpreting your dates correctly. Sometimes, apps can misread date formats, which can result in strange data output.

Log in to reply.