2 Replies Latest reply on Oct 5, 2018 6:19 PM by Chris McClellan

    Can not mix aggregate and non-aggregate comparison or result in case statement

    seraj alam

      I am having an issue with below calculation and its throwing error "Can not mix aggregate and non-aggregate comparison or result in case statement" below is the calculation for the same. Please help

       

      CASE STR([OUTS])

      WHEN '1' THEN [Location_Sls_Submit_Prd]

      WHEN '2' THEN [Location_Shpmnts_Submit_Prd]

      WHEN '3' THEN [Location_Xfer_Submit_Prd]

      when '4' then [Location_Sls & Shpmnts_Submit_Prd]

      when '5' then [Location_Sls & Shpmnts & Xfer_Submit_Prd]

      WHEN '6' THEN (SUM([ DCIT_CO_Inv Qty_Submit prd_Numerator])/sum([ DCIT_CO_Inv Qty_Submit prd_Denominator]))

      END