2 Replies Latest reply on Jul 17, 2017 8:17 AM by Leslie Raillon

    Product portfolio

    Leslie Raillon

      Hello,

       

      Enclosed concerned database (extract only).

       

      I have to know what product portfolio is most commun in my database.

       

      So data should look like:

      X% of users have 1 prod A and 0 others

      ...

      X% of users have N prod A and 0 others

      X% of users have N prod A and 1 prod B

      ...

       

      Eccetera

       

      Any idea how to  generate that?

       

      Thanks a lot,

       

      Regards,

       

      Leslie

        • 1. Re: Product portfolio
          Anna Cheetham

          Assuming each separate product purchase is a separate row, this is really not an easy thing to do, especially if you have a lot of different products.

           

          If you only have a small number of products, however, it is manageable in the following way:

           

          Step 1. Create a separate field for each product.  It might be easier to do this in your data source or you can do it in Tableau.  There are slightly different ways of doing it but my preferred way would be to create each variable as a numeric field with a value of 1 if the record refers to that product and a value zero.  For example, if one of your products is "Accessories" then you would create a field called "Accessories" as follows:

          IF [Product] = 'Accessories'

          THEN 1

          ELSE 0

          END

           

          Step 2. Create a calculated field that concatenates the count of each product by customer and the name of the product.  Something like:

          STR({FIXED  [Customer Name]: SUM([Accessories])})

          + ' Accessories, ' +

          STR({FIXED  [Customer Name]: SUM([Appliances])})

          + ' Appliances, ' +

          STR({FIXED  [Customer Name]: SUM([Art])})

          + ' Art, ' +

          STR({FIXED  [Customer Name]: SUM([Binders])})

          + ' Binders, ' +

          STR({FIXED  [Customer Name]: SUM([Bookcases])})

          + ' Bookcases'

           

           

          Step 3.  Create a chart or table with this calculated field and count distinct of customer.  Then sort descending by the values of the count distinct. 

           

          I'm sure this could be prettied up a bit but you can see the basic idea:

           

           

          Obviously, if you've got far more than the 5 products I've used here, you're going to have an unuseable mess.

          • 2. Re: Product portfolio
            Leslie Raillon

            Thanks a lot!

            I do have more than 5 products

            But that gives me a first idea of results

            Regards

            Leslie