Can we use in Mixpanel in Custom Property Formula something like sql is_null?
Hi Monika, Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> đ
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
Yes, in Mixpanel's Custom Property Formula, you can use a function similar to SQL's IS NULL. The equivalent function in Mixpanel is called defined().
Here's how you can use it:
1. To check if a property is not null (equivalent to IS NOT NULL in SQL):
defined(properties["Your_Property_Name"])
2. To check if a property is null (equivalent to IS NULL in SQL):
not(defined(properties["Your_Property_Name"]))
The defined() function determines if a value exists. If a property is not defined on a parent event or profile, this will return false, otherwise it will return true.
It's worth noting that in Mixpanel, null values are parsed as (not set) in the UI, but will appear as <null> or null when looking at raw data.
Custom Properties: Calculate new properties on the fly Reference> provides more details on the functions available in Custom Property Formulas, including the defined() function.
kapa.ai is still learning and improving, please let me know how I did by reacting below.
âšī¸Â Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
