## Introduction

This article walks through a few scenarios of how list properties behave within Mixpanel. The examples used here are from the Insights report, but the principles of how filter and breakdowns work with list properties remain the same across reports.

## Data

Let's assume an e-commerce platform has these 3 events:

- Event 1:
*PurchaseCompleted**List of ProductIDs*= ["P1", "P2", "P4"]

- Event 2:
*PurchaseCompleted**List of ProductIDs*= ["P2", "P3", "P4"]

- Event 3:
*PurchaseCompleted**List of ProductIDs*= ["P3", "P4"]

Now let's assume that *"List of ProductIDs"* is mapped to a lookup table called *Products* which looks like this:

ProductID |
Category |
Price |

P1 | Clothing - pants | 100 |

P2 | Clothing - shirt | 54 |

P3 | Shoes | 109 |

P4 | Electronics - music | 199 |

## Use-cases

### Breakdown

- Breakdown a list property
**Question:**TOTAL of*PurchaseCompleted*broken down by*"List of ProductIDs"***Answer:****List of ProductIDs****Total**P1 1 P2 2 P3 2 P4 3 **What's going on here?**When breaking down, each of the list's contents is evaluated as a single item. So for example, P2 is present in Event 1 and Event 2, so the TOTAL (of the*PurchaseCompleted*event) where "P2" is present is 2.

- Breakdown by lookup profile property that's joined to a list property
**Question:**TOTAL of*PurchaseCompleted*broken down by*"List of ProductIDs"*→*Category***Answer:****List of ProductIDs****Total**Clothing - pants 1 Clothing - shirt 2 Shoes 2 Electronics - music 3 **What's going on here?**When breaking down, each of the list's contents is evaluated as a single item after being mapped to the lookup table. So for example, P2 is present in Event 1 and Event 2, and P2 mapped to the lookup table which gets us*Category*= "Clothing - shirt", so the TOTAL (of*PurchaseCompleted*events) where "Clothing - shirt" is present is 2. The thing to note here is that the results are identical to when*PurchaseCompleted*was broken down by*"List of ProductDs"*, except the*ProductIDs*are replaced by*Category*.

- Breakdown by lookup profile property that's joined to a list property AND by the list property itself
**Question:**TOTAL of*PurchaseCompleted*broken down by*"List of ProductIDs"*→*Category*AND*"List of ProductIDs"*(2 breakdowns applied)**Answer:***List of ProductIDs*.*Category***List of ProductIDs****Total**Clothing - pants P1 1 P2 1 P4 1 Clothing - shirt P1 1 P2 2 P3 1 P4 2 Shoes P2 1 P3 2 P4 2 Electronics - music P1 1 P2 2 P3 2

P4 3

**What's going on here?**For each breakdown value, Mixpanel recomputes the list breakdown. So for example, TOTAL (*PurchaseCompleted*) with "*List of ProductIDs*" →*Category*= "Shoes" should get us Event 2 and Event 3:- Event 2:
*PurchaseCompleted**List of ProductIDs*= ["P2", "P3", "P4"]

- Event 3: PurchaseCompleted
*List of ProductIDs*= ["P3", "P4"]

*"List of ProductIDs"*, we get these results for "Shoes"(*ProductID*= "P3"):- P2: 1
- P3: 2
- P4: 2

- Event 2:

### Filter

- Filter by any element of a list property
**Question:**TOTAL of*PurchaseCompleted*filtered by" *List of ProductIDs*"Any = (equals) "P1" **Answer:***PurchaseCompleted - TOTAL*: 1

**What's going on here?**The "Any" operator filters down events when the filtered value matches ANY item in the list property. So in this example, the only event in which "List of ProductIDs" has "P1" present even once is Event 1, so the total event count for this filter is 1.

- Filter by all elements of a list property
**Question**: TOTAL of*PurchaseCompleted*filtered by" *List of ProductIDs*"All = (equals) "P1" **Answer:***PurchaseCompleted - TOTAL*: 0

**What's going on here?**The "All" operator filters down events when the filtered value matches ALL of the items in the list property. So in this example, there is no event in which "List of ProductIDs" has all the elements equal to "P1", so the total event count for this filter is 0.

- Filter by list property and broken down by list property
**Question:**TOTAL of PurchaseCompleted filtered by" *List of ProductIDs*"Any = (equals) "P1" **Answer:****List of ProductIDs****Total**P1 1 P2 1 P4 1 **What's going on here?**There is only 1 event that contains "P1" (Event 1,*"List of ProductIDs"*= ["P1", "P2", "P4"]), so when that one event is broken down by*"List of ProductIDs"*, Mixpanel evaluates each list item individually, thereby getting us:- P1: 1 (1 event)
- P2: 1 (1 event)
- P4: 1 (1 event)

- Filter by lookup profile property that's joined to a list property and then broken down by list property
**Question:**TOTAL of*PurchaseCompleted*filtered by*"List of ProductIDs"*→*Category*Any = (equals) "Shoes" **Answer:****List of ProductIDs****Total**P2 1 P3 2 P4 2 **What's going on here?**There are 2 events that contain where the*Category*mapping for at least one of the*ProductIDs*in "*List of ProductIDs*" is equal to "Shoes" (i.e.*ProductID*= P3).- Event 2: PurchaseCompleted
- List of ProductIDs = ["P2", "P3", "P4"]

- Event 3: PurchaseCompleted
- List of ProductIDs = ["P3", "P4"]

*"List of ProductIDs"*, Mixpanel evaluates each list item individually, thereby getting us:- P2: 1 (1 event)
- P3: 2(2 events)
- P4: 2 (2 events)

- Event 2: PurchaseCompleted

- Filter by lookup profile property that's joined to a list property (with multiple matching values) and then broken down by list property
**Question**: TOTAL of*PurchaseCompleted*filtered by*"List of ProductIDs"*→ CategoryAny ∋ (contains) "Clothing" **Answer:****List of ProductIDs****Total**P1 1 P2 2 P3 1 P4 2 **What's going on here?**This filter can be read as "for any of the items in*'List of ProductIDs'*, the lookup property*Category*contains the string 'Clothing'". This operation is filtering down to all the events that contain the*Category*mapping for the*ProductID*contains EITHER "Clothing - pants" or "Clothing - shirt", and that gives us 2 events:- Event 1: PurchaseCompleted
- List of ProductIDs ["P1","P2","P4"]

- Event 2: PurchaseCompleted
- List of ProductIDs ["P2","P3","P4"]

- Event 1: PurchaseCompleted
- Therefore, when those two events are broken down by "List of ProductIDs", Mixpanel evaluates each item of the list individually and we end up getting:
- P1: 1
- P2: 2
- P3: 1
- P4: 2

- Filter by lookup profile property that's joined to a list property (numeric filter) and then broken down by list property
**Question**: TOTAL of*PurchaseCompleted*filtered by*"List of ProductIDs"*→ Price (number)Any < (less than) 100 *"List of ProductIDs"***Answer:****List of ProductIDs****Total**P1 1 P2 2 P3 1 P4 2 **What's going on here?**The filter can be read as "for any item in*'List of ProductIDs',*the lookup property*Price*is less than 100" and it only matches 1 product, and that is P2. Therefore, what this operation is doing is filtering down to all the events that contain P2 as ANY of the values in "List of ProductDs", and that gives us 2 events:- Event 1:
*PurchaseCompleted**List of ProductIDs*= ["P1", "P2", "P4"]

- Event 2: PurchaseCompleted
*List of ProductIDs*= ["P2", "P3", "P4"]

*"List of ProductIDs"*, Mixpanel evaluates each item of the list individually and we end up getting:- P1: 1
- P2: 2
- P3: 1
- P4: 2

- Event 1:

## Comments

Article is closed for comments.