Mixpanel Community Icon

How to breakdown data by day of the month? 1st 11 days vs rest?

·
·

How to breakdown data by day of the month? 1st 11 days vs rest?

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    To breakdown data by day of the month, you can use Mixpanel's JQL (JavaScript Query Language) built-in function mixpanel.numeric_bucket(). This function can be used to segment events over a calendar period when applied to the time property. Here is an example of how you can use it:LBKSfunction main() { return Events({ from_date: "2016-01-01", to_date: "2016-01-30", }).groupBy([mixpanel.numeric_bucket('time', {bucket_size: 86400 ** 1000})], mixpanel.reducer.count()); }LBKSIn this example, 86400 ** 1000 is used as the bucket size to represent one day in milliseconds. However, to specifically breakdown data into two segments: 1st 11 days vs the rest of the month, you might need to write a custom function in JQL to bucket the days accordingly. Unfortunately, the provided knowledge sources do not include a specific example of how to do this.For more details, you can refer to the Mixpanel documentation on JQL.

    kapa.ai is still learning and improving, please let me know how I did by reacting below.

    ⤵️ Hint: Mention @kapa.ai in the thread for follow-ups.