1 Reply Latest reply on Feb 13, 2019 7:58 AM by Paul Wachtler

    share of customers with multiple items

    Sven Serr

      Customer ID

      Item ID
      11
      12
      21
      22
      22
      23
      33
      33
      34
      42

      Hi guys,

       

      hope you can help me .

       

      So what do I have? I do have a lot customer which can purchase a lot of different Items. (see table). There are 4 differente customers and 4 different products in this example. I somehow want to agggregate my data so that I get the following infomration:

       

      • 50% of my customers bought item 1 and 2 (customer 1 and 2)
      • 25% of my customer bought item 1 and 3 (customer 2)
      • 0% of my customer bought item 1 and 4
      • 25% of my customer bought item 2 and 3 (customer 2)
      • 0% of my customer bought item 2 and 4
      • 25% of my customers bought item 3 and 4 (customer 3)

       

      Thanky you in advance!

       

      Sven

        • 1. Re: share of customers with multiple items
          Paul Wachtler

          Hi Sven,

           

          You can create calculated fields for each one of the scenarios you listed.  For example, for the numbers of customers that purchased items 1 and 2 you can use this:

           

          countd(if {fixed [Customer ID]: countd(if [Item ID] = 1 then [Item ID] end)} + {fixed [Customer ID]: countd(if [Item ID] = 2 then [Item ID] end)} = 2 then [Customer ID] end) /

          countd([Customer ID])

           

          For each of your other scenarios you just need to change the items that are being looked for in the LOD calculations.

           

          Best,

          Paul