:wave: I am trying to build a metric using <funnel...
# announcements
b
👋 I am trying to build a metric using funnel metrics, but a bit lost on how this works. How do I reference an existing metric in my new metric query? Also, the usage of User Value Aggregation isn't clear in the documentation.
f
Hi Efren. Lets say you have 2 steps in your funnel. You would create separate metrics for each step. For example: 1.
select user_id, timestamp from step1
2.
select user_id, timestamp from step2
Step 1 doesn't need anything special to work. For Step 2, you'll need to set the denominator to Step 1 to turn it into a funnel metric. That will make the metric
(step 2 conversions) / (step 1 conversions)
, in other words the percent of people on step 1 who completed step 2.
User Value Aggregation is used for count, duration, and revenue metrics. When the metric SQL returns multiple rows for a user (e.g. they made multiple purchases), the User Value Aggregation tells you how to combine them together. By default, we do
SUM(value)
. So if they made 3 purchases, we would sum the values together and it would be treated as 1 big purchase instead.
b
Is that query on a single metric?
ahh I think I get it now
f
Each funnel step is a separate metric. You refer to the previous funnel step using the Denominator dropdown
b
So the main query on #2 is the numerator only for the ratio.
f
correct
b
Does it allow percentage? I havent got to show up percentage on a metric (e.g %)
f
If you choose the metric type as
Binomial
then it will treat it as a percentage
🙏 1
b
Re user value aggregation, is that used within the query or the input field that says "User Value Aggregation". I tried using PERCENTILE() but doesnt work.
f
The aggregation is defined separately from the numerator query in it's own text input. The only column you have access to from the numerator is
value
.
👍 1