3 Replies Latest reply on Aug 31, 2018 2:42 AM by Shariq Mohd

    Aggregation in CASE statement

    Shariq Mohd

      Hi All,

       

      I am trying to achieve this in my CASE statement however i am getting "Cannot mix aggregate and non aggregate comparisons or result in CASE expression" . Is there an alternate way/approach to achieve this ?

       

      CASE [Numerator]

          WHEN "DAYS_CREATION_DISCOVERY"

              THEN SUM([Days Creation Discovery])

          WHEN "DAYS_SUBMISSION_CREATION"

              THEN SUM([Days Submission Creation])

          WHEN "DAYS_CLOSURE_CLOSURE_REQUEST"

              THEN SUM([Days Closure Closure Request])

          WHEN "EVENT_COUNT"

              THEN COUNTD([Event Count])

         ELSE NULL

      END

       

      Thanks.

       

      Shariq