4 Replies Latest reply on Sep 19, 2016 9:23 AM by Bhag Ram

    Count distinct within partition and dates

    Bhag Ram

      Hi - I am new to Tableau and learning the ropes. 

      I am trying to figure out how to count distinct occurences within a partition and dates. I cannot attach workbooks, but attached is an excel with the sample mock up data I have.


      In the table: I have ID, sub ID, Flag, Date and count.


      I need to create a metric that gives me a count for:


      1.  The total number of all unique flag values - basically de-dupe the flag and pick the last date instance within each flag type

      2. The total number of unique flag values A - basically count the last date instance of this flag type


      The expected results are 3 and 1 respectively. Please see attached excel.


      Would appreciate some ideas and pointers on how to perform this calculation.


      Thanks much!