How to filter/breakdown by a list of object property? Give some examples.
Hi Sharon L., 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
To filter or breakdown by a list of object property in Mixpanel, you can use the following approaches: 1. Filtering:
When filtering by a list of object property, you can use the "Any" or "All" operators to match values within the list. Here's an example: LBKS| "List of ProductIDs" → Price (number) | Any | < (less than) | 100 |LBKS
This filter can be read as "for any item in 'List of ProductIDs', the lookup property Price is less than 100".2. Breakdown:
To breakdown by a list of object property, you can select the list property and then choose a specific property within the objects. For example: LBKSTOTAL of PurchaseCompleted broken down by "List of ProductIDs" → CategoryLBKS
This breakdown will group the results by the Category property of each ProductID in the list.Here are some more detailed examples: 1. Filtering and breaking down by a list property: LBKSTOTAL of PurchaseCompleted filtered by | "List of ProductIDs" | Any | = (equals) | "P1" | Broken down by "List of ProductIDs"LBKS
2. Filtering by a lookup property joined to a list property: LBKSTOTAL of PurchaseCompleted filtered by | "List of ProductIDs" → Category | Any | = (equals) | "Shoes" | Broken down by "List of ProductIDs"LBKS
3. Using contains operator for multiple matching values: LBKSTOTAL of PurchaseCompleted filtered by | "List of ProductIDs" → Category | Any | ∋ (contains) | "Clothing" | Broken down by "List of ProductIDs"LBKS
These examples demonstrate how you can use list of object properties to filter and breakdown your data in Mixpanel, allowing for more detailed analysis of complex data structures.For more information and detailed explanations, you can refer to the <https://docs.mixpanel.com/docs/data-structure/property-reference/data-type#list-property-support|Mixpanel documentation on List Property Support> and List of Objects Property Support.
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.
kapa.ai Assume that:
"event": "Product Added",
"properties": {
"cart": [
{
"brand": "Puma",
"category": "Jacket",
"price": 30
},
{
"brand": "Adidas",
"category": "Hats",
"price": 15
}
]
}
“cart” is a list of object property. How to filter/breakdown by “cart” or the key-value pairs in the child objects? Give some examples.
Let me check the knowledge base for you again. One moment! 📚
Based on the provided example, I can explain how to filter and breakdown by the "cart" list of object property or its child objects in Mixpanel. Here are some examples: 1. Filtering by the "cart" property: You can filter events based on the contents of the "cart" property. For example: LBKS| "cart" → brand | Any | = (equals) | "Puma" |LBKS
This filter will select all "Product Added" events where any item in the cart has the brand "Puma".2. Breakdown by the "cart" property: You can break down your events by the properties within the "cart" objects. For example: LBKSTOTAL of "Product Added" broken down by "cart" → categoryLBKS
This breakdown will group the results by the category of each item in the cart.3. Filtering by multiple conditions: You can combine multiple conditions to filter your events. For example: LBKS| "cart" → price | Any | < (less than) | 20 |LBKS
This filter will select all "Product Added" events where any item in the cart has a price less than 20.4. Using the Sum computation: You can use the Sum computation to calculate the total price of items in the cart: LBKSSum("cart" → price)LBKS
This will give you the total price for all items in the cart.5. Using the Size computation: You can use the Size computation to count the number of items in the cart: LBKSSize("cart")LBKS
This will give you the number of items in the cart.6. Distinct Count computation: You can use the Distinct Count computation to count unique brands in the cart: LBKSDistinct Count("cart" → brand)LBKS
This will give you the number of unique brands in the cart.It's important to note that Mixpanel has some limitations when working with list of object properties: 1. Only the first 5 objects within the list will be parsed in the Mixpanel UI by default. Customers on a paid plan may request an increase to this limit.
2. The total size of an event property is limited to 8KB, and a user profile property is limited to 256KB.
3. There's a maximum of 255 keys allowed, and nesting is not supported.For more detailed information on working with list of object properties in Mixpanel, you can refer to the <https://docs.mixpanel.com/docs/data-structure/property-reference/data-type#list-of-objects-property-support|List of Objects Property Support documentation>.
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.