I’m trying to build a flexible funnel tool for our more technical business users. I’d like the pattern to be:
- The user defines a
yesno
dimension in theevents
table - The user opens the
funnel_explorer
Explore and enters the name of the dimension they just created into thedimension_name
filter. - The PDT uses a
CASE
statement to to check if the dimension that they entered is equal to'Yes'
.
Is there a way to do this? The code below checks the dimension_name
as a string ('my_dimension_name' = 'Yes'
), but I would like it to evaluate the dimension_name
and compare that to 'Yes'
.
Thanks!
Adam
view: funnel_explorer {
derived_table: {
sql:
SELECT
CASE WHEN {% condition dimension_name %} 'Yes' {% endcondition %}
THEN events.timestamp
ELSE NULL END
) AS event_1_time
FROM events
;;
}
filter: dimension_name {
}
...