This message was deleted.
# ask-questions
w
This message was deleted.
f
What is the
value
dimension?
f
thats int value with 1 as impression and 2 as user clicked on ad
f
ah, so those should probably be metrics and not a dimension
you would have 2 metrics, one for impressions and one for "clicked on ad"
f
yes so in my metric query I am filtering user with where condition (
where value=2
)
I want to measure click on ad wrt to total impression shown, so I defined metric with where
value=2
.
Also if I dont define dimension it keeps on complaining about dimension cannot be resolved
@future-teacher-7046 looks like there is bug in the dimension query, by default dimension query uses
substr(0, 10)
however the index position for first character starts from 1.
Copy code
__distinctUsers as (
  -- One row per user/dimension
  SELECT
    e.user_id,
    substr(
      to_iso8601(date_trunc('day', e.conversion_start)),
      0,
      10
    ) as dimension,
    (
      CASE
      WHEN count(distinct e.variation) > 1 THEN '__multiple__'
      ELSE max(e.variation) END
    ) as variation,
    MIN(e.conversion_start) as conversion_start,
    MIN(e.conversion_end) as conversion_end
  FROM
    __experiment e
  GROUP BY
    dimension,
    e.user_id
),
f
Ah, thanks for catching that. We only use substr for Presto/Athena. I'll fix it to be 1-based.
I fixed the substr bug in the latest Docker build
🙌 1
f
Thanks let me pull the latest one
146 Views