Mixpanel Community Icon

Labeling Historical Customer Data by Region Changes

·
·

We have several events with the properties customerId and customerRegion. The problem here is that the customerRegion has changed, so for example, a customer that belonged to India, WA & Africa region, now it belongs to just India; however, there is a customer that belonged to India, WA & Africa and now belongs to Türkiye, West Asia & Africa, which means that they are not from India. I would like to label the historical data from the first customer as India, and from the second one as Türkiye, West Asia & Africa. I used this custom property, but it is not working, because it is changing the data on event-level, not on the dataset level:

  • Avatar of Andrew S.
    Andrew S.
    ·
    ·

    Why are you doing your customerID=customerID part? why not just have ifs(x=="y","y",z=="y","y",x=="a","a",x=="b","b",...) etc. try pairing it down and it should work, then if you need to make it more complex you can see if your logic works/breaks what is working.

  • Avatar of Roberto M.
    Roberto M.
    ·
    ·

    Because we have a very long list of customers. For example, an Indian customer (we don't know if it is Indian or not) we just know that now is India, but previously was India, WA & Africa). What I would like to have is like a table with all the historical customerIds that belonged to India, WA & Africa and compare it with the current India list. If they match, then they belong to India, if don't, they belong to Türkey, WA & Africa

  • Avatar of Andrew S.
    Andrew S.
    ·
    ·

    So are you recording the customer region as a customer property or an event property? If a customer property then Mixpanel would replace the prior with the new when tracked. So you wouldn’t have the prior to look at anymore