2

I used this query in BigQuery it works perfectly. I am now trying to 'translate' it into a formula for a Looker Studio calculated field. But it's not getting the same result.

This is what I have for determining the number of engaged sessions:

CASE WHEN Event Param Name = 'session_engaged' THEN CONCAT( CASE WHEN Event Param Name = 'ga_session_id' THEN Event Param Value END, User Pseudo ID ) END

The formula is valid, but the result it yields is 0, when it shouldn't be. Has anyone else encountered this problem? Or can anyone point me onto the right direction to solve this? I'm fairly new to Looker Studio formulas, so any help would be highly appreciated.

Thanks in advance!

Agagaga
  • 21
  • 1
  • 1
    Can you not use your BQ query direct from Looker Studio by creating a view for it? That's what I do, wherever I can, to keep my logic in one place. – MandyShaw Jul 05 '23 at 13:08
  • Hi Mandy, I suppose I could. I haven't tried that yet. I'm fairly new to all of this, so I'm not aware of all the options. So you would suggest creating a view in BQ with the fields I need for the engagement rate and then adding this view as a data source to Looker Studio? I'm not sure this would work in my particular case, because I need the fields I'm trying to create with the above formula in a table and then I'd have two different data sources. The view and BQ as a whole. Please correct me if I'm wrong. – Agagaga Jul 06 '23 at 14:59
  • Hi, BQ as a whole is not a data source, a BQ table or view within a BQ dataset would be the data source. If using Looker Studio with BQ you're likely to end up with quite a few data sources each exposing specific data, therefore. – MandyShaw Jul 06 '23 at 19:42
  • But you can include as many columns (including calculated ones) in a view as you like, and then use that data source in multiple places. Performance allowing. – MandyShaw Jul 06 '23 at 20:16

0 Answers0