1 Reply Latest reply on Apr 11, 2017 9:51 AM by Patrick Van Der Hyde

    Tableau Calculation and its capability


      Hi All,

      I have a the sample data pasted below.

      • The data is getting pulled from SQL Server database
      • Unique columns to make a record unique as shown below (Unique record is created by not just the 2 columns its in fact 22 columns that make a record unique.)
      • Logic: a)  For Group = Gp1 and Product = P1: Count unique values of columns in F1 to F4 (sample number, actual is about 9 fieds. Do the distinct count for the four fields we have . so as per sample data here its calculated to 3 and we need to ignore the n/a values too.
      •              use same logic for rest of the columns in Gp1 and Product = P2 and
      •            b) Now For Group = Gp2 and Product =P1: Check if the value that has already occurred in previous should not be counted and ignored in the count and also ignore  

      n/a values. Basically as the Group changes we have to see if in previous products the values which already appeared should not be counted.


      This calculation can be performed with some tricks and trips in small sample data but for the cases where our record uniqueness is displayed using 22-23 fields, I don't think its possible to do this in tableau.

      There are two ways to handle this scenario through Table Calculation and Pivoting but with this kind of dataset it @gets way complex when deriving the granularity of the record. Please suggest with your experience on this.




      Gp3P1brokerswapn/a time deposit3
      Gp3P2salescashn/a n/a0
      ATtest1test2n/a n/a 2
      DTtest3n/an/a n/a 1