10 Replies Latest reply on Aug 1, 2012 2:26 AM by hubert.rogers.0

    How to create a set of userIDs based on purchase history

    hubert.rogers.0

      Hi there,

       

      I have data like this representing transactions:

       

      UserID     Purchase     Price

      1     Product1     10.99

      1     Product2     5.99

      2     Product1     10.99

      3     Product2     5.99

      4     Product3     7.99

       

      I need to group consumers (userIDs) based on whether or not they have purchased a particular product. That's what I need help with the custom formula - I guess it has to return true or false based on whether or not there is *any* row in the data set that includes that particular userID and a chosen product that I want to segment on. How do I do this? In SQL it would just be a simple SELECT ... WHERE statement.

       

      So if I want to segment on Product1 I should get userIDs 1,2 in one set and 3,4 in another.

       

      Thanks for any advice!