Question

Flexible funnel tool - using a filter to choose a dimension

  • 11 April 2017
  • 1 reply
  • 84 views

I’m trying to build a flexible funnel tool for our more technical business users. I’d like the pattern to be:



  1. The user defines a yesno dimension in the events table

  2. The user opens the funnel_explorer Explore and enters the name of the dimension they just created into the dimension_name filter.

  3. 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 {
}
...

1 reply

Userlevel 1

Adam, I would start with this Discourse article and see how much you need to customize it. Please, let us know if you run into any issues or questions. Thanks!

Reply