1 Reply Latest reply on Feb 20, 2013 3:54 PM by Shawn Wallwork

    How to mix aggregate and non-aggregate measure in Calculated field?

    Nicolas Garcias

      Hello everyone,

       

      I'm trying to get this calculated field but I only get an error message "'cannot mix aggregate non-aggregate if expression' "

       

      IF(ISNULL([file_creation_date_in_store])) THEN

          IF(DATEADD('hour',-4,NOW()) -[evidence_date])<MAX(([Time Creation]))

              THEN "- "+STR(MAX(([Time Creation]))+" minutes"

              ELSE "+ " +STR(MAX(([Time Creation]))+" minutes"

          END

      ELSE

          "Created"

      END

       

      Time Creation is an calculated field with this formula:

       

      (DATEADD('hour',-[time difference],NOW()) -[evidence_date])*24*60

       

      How would I get the Time Creation max in the first calculated field?

       

      Any insight, will be really helpful.

       

      Regards