7 Replies Latest reply: Jun 27, 2017 11:02 AM by Massimo Leu RSS

    Count distinct

    Massimo Leu

      Hello,

      I need you help. I have the following table

        

      ObjectYes/No
      Object1
      Object1
      Object1NO
      Object1NO
      Object1SI
      Object1SI
      Object2
      Object2
      Object2NO
      Object2SI
      Object3
      Object3
      Object3NO
      Object4
      Object4
      Object4NO
      Object5
      Object5
      Object6
      Object6
      Object7

      How can I count distinct object in such a way that:

      If the object is "Yes" then "Yes" if the object is "Yes" and "No" then Yes, if the object is only "NO" then "NO" otherwise "NULL"

      The final result should be:

         

      YesNoNull
      Object223

       

      Thanks