I’m facing an aggregation issue in Looker Studio involving two data sources with different granularities.
I have:
-
An events data source, where each user (
id_user) appears multiple times. All filters (e.g. first media source, plan, date, etc.) come from this table. -
A user-level metrics data source, where each
id_userappears only once (e.g. LTV orvl_transaction_cost).
The goal is to apply filters from the events data source and correctly calculate a user-level average metric (e.g. average LTV), considering only users that match those filters.
The issue is that when blending these data sources in Looker Studio, the user-level metric gets duplicated due to the 1:N relationship, even when using aggregations such as AVG, MAX, or MIN.
I’ve already tried:
-
Blending the data sources using
id_useras the join key -
Creating an intermediate metric using
MAX(vl_transaction_cost)and then applyingAVG -
Applying filters only on the events data source
However, the results are still incorrect depending on the filters applied.
I’d like to understand what is the correct approach in Looker Studio to apply filters from one data source while keeping correct aggregation on another when dealing with a 1:N relationship.