Hi everyone,
I've been struggling with an ongoing issue in Looker Studio: I can't seem to display images from multiple data sources in a single column when using blended data.
Currently, I'm working on a task that compares video performance across various social media platforms, using Google and Supermetrics data in Looker Studio. I need a solution that allows me to do this directly within Looker Studio.
Here's an example of what I've tried with just two data sources:
IMAGE(
CASE
WHEN REGEXP_CONTAINS([Link to post], "facebook") THEN [Video image URL]
ELSE [Video thumbnail URL]
END
)
Alternatively, I tried the same formula and changed its format to an image:
CASE
WHEN REGEXP_CONTAINS([Link to post], "facebook") THEN [Video image URL]
ELSE [Video thumbnail URL]
END
Neither approach has worked. I’m aware that displaying the images in separate columns is an option, but with five data sources, this would result in five image columns, which isn't ideal.
Has anyone encountered this issue or have any suggestions for resolving it?
Thanks in advance for your help!
Interesting question! I have a few clarifying questions.
Have you tried two calculated fields: one source-level field using the CASE statement you mentioned to return the image URL, then a second field (can either be source-level or report-level) that uses that calculated field in an IMAGE formula? That's the workaround I have used in the past. For some reason IMAGE doesn't like to have CASE or other conditional statements in it.)
Ugh, but now I'm realizing that may not work since you can't create the first field at the source level since it's a blended source. (If I'm understanding your setup correctly.)
But, I have definitely seen this issue that occurs when trying to create the IMAGE URL dynamically. I just took a quick look but didn't see a bug report on this, so maybe we should create one!
Thanks for the replies.
I’ve created a demo to show my setup and what I aim to achieve.
In this scenario, I’m analyzing posts from Linkin Park and Green Day on social media. I want to see the top-performing posts in a single table that includes both Facebook and Instagram data.
In my blend, I used a full outer join with Date and Platform as the join conditions. Date is the post date, and the Platform field only contains "Facebook" or "Instagram". This ensures my blend will work as intended.
For all fields in the table, I’m using a CASE WHEN function to combine data from both sources (Facebook and Instagram) into one column. For example, in the case of Picture URL, my formula looks like this:
CASE
WHEN Platform (FB) = "Facebook" THEN Picture URL FB
ELSE Picture URL IG
END
This works perfectly for URLs, text, and dates. However, when I attempt to display images in the same way, I only see blank fields. Here’s what I’ve tried so far (without success):
1. Used the same CASE WHEN function as above and changed the data type from URL to IMAGE.
2. Added the IMAGE function to the formula and set the data type to IMAGE:
CASE
WHEN Platform (FB) = "Facebook" THEN IMAGE(Picture URL FB)
ELSE IMAGE(Picture URL IG)
END
3.Used fields from the original data sources that were already set to the IMAGE data type and tried both methods above.
From my testing, it seems that the only way to display an image in a blended data table is by using an IMAGE field from the original data source (i.e., already treated as an IMAGE data type, not URL). This ties back to what @lauratilton mentioned—IMAGE fields don’t seem to work well with CASE WHEN or other conditional statements. At this point, I feel out of options and would appreciate any suggestions or guidance.
I’m not sure how to report this as a bug, so if this is the right place to discuss this, please let me know, or if there’s a specific process to report it elsewhere.
Thanks!
Thanks so much for clearly explaining the problem!
This does seem like a bug to me. To report it, follow the steps in the "Send your feedback" section of the Report a Problem article. You can include a link to this community post to give our team more context on the issue.
Following up on this issue. I get the same problem in Looker Studio where the image doesn't render on table when I use blended data. If I use the original table source, it works.
I still have no solution for this, I don't think there is one at the moment. You can also report it to Google here: https://cloud.google.com/looker/docs/studio/report-a-problem-with-looker-studio?visit_id=63882732734...
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 |