Hello, I just updated our data model, and fixed al...
# gooddata-cloud
m
Hello, I just updated our data model, and fixed all the errors before saving. However, when looking through my dashboards, one insight was broken. A pic is attached. Note that two metrics are, or rely on, "Expected Google Generated CLV". Oddly, if remove just the "Expected Google Generated CLV" insight everything works (see pic 2) - even though the other insight is still included. Why is this the case? Why does insight work with "Expected Google RoAS" even though it is derived "Expected Google Generated CLV", but not with "Expected Google Generated CLV" directly?
Here is the error:
You could rewrite "Expected Google Generated CLV" as:
Copy code
SELECT (
  SELECT COUNT({label/first_touch_credit.journeyId})
    WHERE {label/visited_website_before_purchase} = "true"
    AND {label/firstTouchSource} = "google") * (
  SELECT SUM({fact/value_origin_breakdown.value}) / count ({label/first_touch_credit.journeyId})
    BY ALL OTHER
    WITHOUT PF EXCEPT {label/org.id})
Which breaks. However, if you remove the second reference to
label/first_touch_credit.journeyId
to get:
Copy code
SELECT (
  SELECT COUNT({label/first_touch_credit.journeyId})
    WHERE {label/visited_website_before_purchase} = "true"
    AND {label/firstTouchSource} = "google") * (
  SELECT SUM({fact/value_origin_breakdown.value}) / 1
    BY ALL OTHER
    WITHOUT PF EXCEPT {label/org.id})
It works. Just with the wrong value.
If I remove timestamp as a filter, that also fixes it.
Solved! I needed add the dataset to count by in the last count. Once I did that, everything worked.
🙌 1
i
Hey Michael, Happy to hear that you were able to fix the issue all by yourself. Thanks a lot for sharing the solution with us, appreciated!!