When creating an Insight, I usually add some filters. Imagine that I want to use a property of type Date as a filter but I want to map it to Day of the Week (e.g. Monday, Tuesday, etc). Essentially, creating a custom event property that maps a Date to Day of the week. How can I do it? I couldn't find any formula that converts Date to Day of the week. Plus, in the Breakdown this mapping can be done very easily, meaning that there is a Mixpanel internal mapping function but is not available as a formula function.
You're right that Mixpanel's breakdown feature natively supports breaking down Date properties by "Day of Week," but unfortunately, the knowledge sources do not document a formula function in Custom Properties that converts a Date value to a Day of the Week string (e.g., "Monday", "Tuesday").
The available date-related functions in Custom Properties are limited to:
datedif โ subtracts two dates (returns a numeric difference in days, months, or years)
TODAY() โ returns the current date
There is no documented WEEKDAY(), DAYOFWEEK(), or equivalent function in the Custom Properties formula language.
What you can do as workarounds:
Use Breakdown instead of Filter for Day of Week segmentation: Since the Day of Week mapping is natively available in breakdowns, you could restructure your analysis to use it there rather than as a filter.
Typecast + Custom Buckets: If your date property can be expressed numerically (e.g., a Unix timestamp), you might be able to typecast it, but this still wouldn't give you a clean Day of Week mapping via formulas. [Typecasting]
Track Day of Week at ingestion time: The most reliable solution would be to send a separate event property (e.g., day_of_week) at the time of tracking, computed server-side or client-side before sending to Mixpanel.
Use a Lookup Table: If you have a mapping of dates to days of the week, you could upload a CSV Lookup Table and map your date property to it, which would then expose "Day of Week" as a derived property usable in filters and breakdowns. [Lookup Tables]
I'm sorry I can't provide a direct formula-based solution โ the knowledge sources simply don't document this capability in Custom Properties formulas.
โน๏ธย Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
