7 Replies Latest reply: Apr 9, 2018 5:04 PM by Digvijay Singh RSS

    Count distinct if column contains specific value and sum is less than

    patrico mesri

      Community, hi.

      I been trying to insert a KPI that counts distinct the documents which are Type Q and where Date1-Date2 is less than 0.

       

      Date1Date2DocumentsTypeHeader 5Header 6
      15/07/20174/09/20173333333Q
      4/05/20171/02/20173244443Q
      19/02/201715/01/20179930303F
      2/03/201714/03/20173333333Q

       

      I have tried the following and I know why it does not work, but I can't seem to find a way to add the rest...

      IF(SUM([Date1]-[Date2]<0), Count({<[Type]={"Q"}>} [Documents],))

      This formula gave me the TOTAL of Documents Type Q.

       

      Thank you in advance for your help.

      Kind regards.