One of our key metrics is the proportion of active users who do a certain action at least X times a week.
I have two JQL queries:
- One that uses a certain event as a proxy for an "active user" and counts the number of "active users" per week.
- The other that counts number of users who complete the action X times or more per week.
Both queries return a collection of timestamps and counts. The timestamps are from the builtin "mixpanel.weekly_time_buckets", so they marry up between the two queries.
What I want to be able to do is to join the two collections, using the timestamp as the key. For each timestamp (i.e. for each week) I want to be able to report:
- Count of active users (count from query A)
- Count of users meeting our criteria (count from query B)
- Proportion of active users meeting criteria (count from B divided by count from A)
The two approaches I've used have both been dead ends:
- When I've tried doing a map on A to set a property to the value from a filter of B, I get an error: "Attempting to apply multiple transformations to an intermediate collection."
- When I've tried aggregating both queries into a plain old JS collection, it complains that "main() must return a chain of transformations applied to a data source"