5 Replies Latest reply on Dec 9, 2019 8:32 AM by Jim Dehner

    getting error like(can't mix aggregate and Non-aggregate Comparison  or result's using CASE Expressions )

    srinivas s

      Hi All,

      I have program filed in that Various program's as per that ,I was created the different calculations (please see the below Metric's)

      when i will change the filter's (Program,Time Period ) based on below calculations need to be apply .

      Calculations for program

      1. POST = Mailed Qty * 0.47
      2. PRE3001 and PRE3002 = Total Mailed  * 0.45     ( Total Mailed= COUNTD((if [Control]=0 THEN [Mail ID] ELSE NULL end))  )
      3. MONTHLY = Total Mailed  * 0.403
      4. WEEKLY = Total Mailed * 0.40



      Calculations for M.Cost

      CASE [Program] WHEN 'POST' THEN [Post]

                     WHEN 'PRE3001' THEN [PRE3001 and PRE3002]

                     WHEN 'PRE3002' THEN [PRE3001 and PRE3002]

                     WHEN 'NCOA_MONTHLY' THEN [NCOA Monthly]

                     WHEN 'NCOA_WEEKLY' THEN [Weekly]


      I want to create the M.Cost , for that i was using the above Calculations ,by using this i am getting error   .

      Is there any way to get this calculations. i have attached twbx file and snap of error .

      anybody please help me out here .....!