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 Reply To: Troubleshooting the issue with data not updating in Looker Studio when selecting a date range in BigQuery

  • 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!