Following up on this repsonse. The query you shared work for july and august but why in unique users am I seeing empty string values still for september august even though all of them have empty strings https://mixpanelcommunity.slack.com/archives/C05VD9GBF09/p1758203863130909?thread_ts=1758203842.251099&cid=C05VD9GBF09
When you see empty string values ("") in the Unique Users breakdown in Mixpanel, even though all events for a given period (like September or August) have empty strings for a property, this is expected behavior. Mixpanel treats empty strings as a distinct value, separate from "undefined" or "null". Here’s how Mixpanel handles these cases: - Empty String (""): If a property is sent with an empty string value, it will appear as (empty string) in the UI. This is different from "undefined" (property not present) or "null" (explicitly set to null) values. If all events in a period have the property set as an empty string, the breakdown will show (empty string) for that segment, and the unique user count will reflect users who had that property value—even if it’s empty. - Undefined/Null: If the property is not sent at all, or is explicitly set to null, it will show as (not set) or "undefined" in the UI. These are grouped separately from empty strings.If you want to exclude empty string values from your report, you can do so by: - Unchecking the (empty string) box in the visualization legend. - Filtering your report to only include instances where the property “is set” and is not an empty string.This behavior is documented in Mixpanel’s property data type and falsy value handling documentation:
Empty string refers to a string with a length of zero, meaning there are no characters or symbols. This happens when a property is sent with a value of "". Empty string are parsed as (empty string) in the UI.
Supported Properties Data Type – Falsy ValuesSo, if all your events for a period have the property as an empty string, you will see a single segment for (empty string) in the breakdown, and the unique user count will reflect all users who had that property value for those events. If you want to remove these from your analysis, use the filtering options described above.
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.
Let me check the knowledge base for you again. One moment! 📚
To filter out (exclude) empty string values from your analysis in Mixpanel, you can use the filtering options in the report builder. Here’s how you can do it: 1. Add a Filter to Your Report: - Click the Filter button in your report. - Select the property you want to filter on. - Set the filter condition to is not and then select (empty string) from the value list.This will exclude all events where the property value is an empty string from your analysis. You can apply this filter globally or as an inline filter on a specific event or step, depending on your report type Filters.If you are creating a custom event, you can define it to only include events where the property is not an empty string by adding the same filter condition when setting up the custom event.> Empty string refers to a string with a length of zero, meaning there are no characters or symbols. This happens when a property is sent with a value of "". Empty string are parsed as (empty string) in the UI. Supported Properties Data Type – Falsy ValuesIf you do not see the (empty string) option, make sure that such values exist in your data for that property, as Mixpanel only shows values that are present in your dataset.
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.
Let me check the knowledge base for you again. One moment! 📚
To exclude empty string values for a property (e.g., utm_source) in a custom property or filter expression, you can add a condition that checks the property is not an empty string (""). Based on the syntax from your example, you can update your expression as follows: plaintext if( A == "X" and defined(utm_source) and utm_source != "" and defined(utm_medium), true, false )LBKSThis ensures that:
- utm_source is defined,
- utm_source is not an empty string,
- and the other conditions are also met.This approach is supported by Mixpanel’s custom property functions, where you can use defined() to check if a property exists and != "" to exclude empty strings Custom Properties: Functions.If you want to apply this in a report filter or custom property, use the same logic to ensure empty string values are excluded from your analysis.
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.
Let me check the knowledge base for you again. One moment! 📚
If your filter logic used an OR condition like (defined(property) OR property = "") within a larger AND statement, it may not have excluded empty strings as you intended. Here’s why: - The condition (defined(property) OR property = "") will always be true if the property is either set (to any value) or is an empty string. But an empty string is also considered "defined" in Mixpanel, so both sides of the OR can be true for empty strings.
- As a result, this logic does not exclude empty strings; it actually includes them.To properly exclude empty strings, you should use an AND condition that checks both that the property is defined and that it is not an empty string, like this: plaintext defined(property) and property != ""LBKSThis ensures:
- The property exists on the event,
- The property value is not an empty string.This approach is supported by Mixpanel’s custom property functions and filter logic, as described in the documentation Custom Properties: Functions.If you use an OR in this context, you will not get the exclusion you want. Only the AND logic will work for this use case.If you still see unexpected results after applying this filter, double-check that your property values are not being sent as other falsy values (like null or undefined), and ensure your filter is applied at the correct level (inline or global) in your report Supported Properties Data Type – Falsy Values.
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.
Let me check the knowledge base for you again. One moment! 📚
The "plain text piece" in your filter expression refers to the logical condition you write in Mixpanel's custom property formula or filter—such as defined(utm_source) and utm_source != "". This is the direct, readable logic you enter to define your filter criteria.Should you make them separate queries?
No, you do not need to make them separate queries. You can combine multiple conditions in a single filter using the AND operator. For example, to require both utm_source and utm_medium to be defined and not empty, you can write: plaintext defined(utm_source) and utm_source != "" and defined(utm_medium) and utm_medium != ""LBKSThis will ensure that only events where both utm_source and utm_medium are set and not empty strings are included in your analysis. You do not need to split these into separate queries; combining them in one filter is the correct approach in Mixpanel’s custom property or filter logic Custom Properties: Functions.If you want to apply this as a custom property, you can use: plaintext if( defined(utm_source) and utm_source != "" and defined(utm_medium) and utm_medium != "", true, false )LBKSThis will return true only for events where both properties are set and not empty.Summary:
- The "plain text piece" is your logical filter condition.
- Combine all your AND conditions in a single query; you do not need to split them.Let me know if you need an example for a specific property or use case!
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.
Let me check the knowledge base for you again. One moment! 📚
