3 Replies Latest reply on Jan 21, 2019 2:05 AM by Mahfooj Khan

    distinct count of record based on a 1 and 0 columns

    jhun.mercado

      Dear All Tableau savvy,

      Could anyone please help me with my calculation? I was playing around with my FIXED formula but looks like nothing is working so far.

       

      IDGroupYesNo
      1A1
      2B11
      3C 1
      4C 1
      5A11
      6A 1
      7A1
      8B 1
      9C 1
      10D1
      11A
      12B1

       

      Group A, for example, has 3 YES (id no 1,5,7) and 2 NO (id no 5,6). Basically, I wanted to get a distinct count of all columns where value = 1. if there is overlapping, they should be 1 only, but my formula returns 2 so it looks like i have more records. For group a, the total count should be 4 (distinct ids) and not 5).

       

      Can you please guide me with the correct formula. Thanks so much.