13 Replies Latest reply on Aug 22, 2018 3:53 AM by Frederico Roldao

    Get Respective dimension out of customer ID and date of purchase

    Frederico Roldao

      Hi there,

       

      I'm trying to build a sort of cohort analysis and I want to analyze which devices people tend to buy the most on the first purchase and on the second purchase.

       

      I have the date each purchase, customer ID and device.

       

      The way that I was trying to build was by:

       

      1. Store the date of the first purchase per customer ID through a LOD: 1st_Purchase: {fixed [buyer_id]: min[order_date]}
      2. Create a dimension that stores if a customer repeats a purchase through the following expression: Repeat_Purchase: iif([order_date],[1st_Purchase],[order_date],null)
      3. Following this, I have created a 3rd dimension to store the date of the 2nd purchase: 2nd_Purchase: {fixed [buyer_id]: min[Repeat_Purchase]}

       

      The next step I wanted to store the device that was used to complete the second purchase. I was trying the following expression: {fixed [buyer_id],[2nd_purchase]:min[experience]}, but this always returns the same experience with the smallest letter.

       

      Can you help me?

       

      Thanks!