5 Replies Latest reply on Mar 3, 2016 6:43 AM by Rgg Rowe

    Calculate distinct amount of a subset

    Rgg Rowe

      Hello,

       

      This seems a simple problem, but confused me a lot...

      The original data is as right part, the formatted table in Tableau is as left part. I want to calculate Valid_Rate = amount(valid equal1) / amount(name) = 3 / 6 = 50%

       

      It is easy to calculate name amount with COUNTD([name]), the question is: how to calculate valid amount? (the amount should be 3)

       

      Very appropriate for any help.

       

      formatted table
      original data

       

      namevalidother
      a1asdf
      b0df
      a1ghf
      a1werw
      a1sdf
      b0xcv
      c0tyu
      c0khjk
      d1iuo
      d1kjl
      e0nd
      e0werw
      f1xcx
      f1cfg

       

      Thanks,

      Rowe