2 Replies Latest reply on Nov 22, 2016 8:43 AM by Dave Pamedis

    Combined Set not working

    Dave Pamedis



      Question on creating a combined sets in Tableau 10.  I have created a very simple data source consisting of customer number and if they have received a blue package, red package or both.  I am having an issue creating a combined set to calculate how many customers received both a red and a blue package.


      my combined set and my calculation report back "0" it should report back 10


      attached is the workbook.  Thank you for your reply.



        • 1. Re: Combined Set not working
          David Li

          Hi Dave, this doesn't work because sets essentially operate at the record (data row) level. The reason you get 0 items in your red AND blue set is that no record is both red and blue. There are customers that have received both, but sets look at each individual record, not at each customer or at any other level of detail.


          If you only need to look at red and blue, one thing you can do is count the number of distinct package colors per customer. If it's equal to two, then you know that the customer has received both red and blue packages.


          To do this, you could use a LOD calculation (though there are many other ways). For instance:

          { FIXED [Customer] : COUNTD([Package]) }

          • 2. Re: Combined Set not working
            Dave Pamedis

            Thanks for your input David.  I did end up creating a SET by using a condition formula


            SUM(IF [Package]="blue" THEN 1 END) >0


            SUM( [Package]="red" THEN 1 END) >0


            I found this article to guide me

            Building a Venn Diagram | Tableau Software