https://www.growthbook.io/ logo
#announcements
Title
# announcements
b

busy-secretary-78039

11/03/2022, 7:09 PM
👋 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

future-teacher-7046

11/03/2022, 7:16 PM
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

busy-secretary-78039

11/03/2022, 7:19 PM
Is that query on a single metric?
ahh I think I get it now
f

future-teacher-7046

11/03/2022, 7:20 PM
Each funnel step is a separate metric. You refer to the previous funnel step using the Denominator dropdown
b

busy-secretary-78039

11/03/2022, 7:21 PM
So the main query on #2 is the numerator only for the ratio.
f

future-teacher-7046

11/03/2022, 7:21 PM
correct
b

busy-secretary-78039

11/03/2022, 7:22 PM
Does it allow percentage? I havent got to show up percentage on a metric (e.g %)
f

future-teacher-7046

11/03/2022, 7:22 PM
If you choose the metric type as
Binomial
then it will treat it as a percentage
🙏 1
b

busy-secretary-78039

11/03/2022, 7:27 PM
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

future-teacher-7046

11/03/2022, 7:31 PM
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
22 Views