11 Replies Latest reply on Feb 22, 2018 6:44 AM by Simon Runc

    Customers Ordering only One Product every time

    varun.kalra.2

      Hi There,

       

      Can you please help me in identifying the number of customers who have ordered only one type of product throughout the years. (attached Workbook) .They should have not ever ordered a different type of product.

       

      For eg. I want to find out number of customers who have ordered only Documents&Brochures every time they ordered. A relative filter on time period would be helpful.

       

      I tried using the LOD :

      1) { FIXED [Customer ID (Client)], YEAR([Order Date (Completed)]): COUNTD([Product Name])}  as a row against each customer id

      2) filter : { FIXED [Customer ID (Client)], YEAR([Order Date (Completed)]): COUNTD([Product Name])=1}

       

      but this is not giving me correct results. It is just hiding the products a customer has purchased and giving only random value.

       

      Ideally I think it would have been correct if the Filter LOD calculation would've been like

       

      { FIXED [Customer ID (Client)], YEAR([Order Date (Completed)]): sum(COUNTD([Product Name])=1)=1}

       

      but tableau does not allow aggregation of already aggregated values (sum(COUNTD([Product Name]))

       

      Thanks in advance

       

      Veekay