10 Replies Latest reply on Sep 22, 2018 1:23 AM by kshitij.nagarkar

    Cannot mix aggregate and non-aggregate comparisons or results in 'if' expression

    kshitij.nagarkar

      Hi Everyone,

      I am making a calculated field but its throwing error that "cannot mix aggregate and non-aggregate comparisons or results in 'if' expression".

       

      My calculated field is:

      IF [Open Dt (Month / Year)] <= MAX([Open Dt (Month / Year)])

      THEN [Balance]

      ELSE NULL

      END

       

      I know we cannot mix aggregate and non aggregate in an 'if' but I want to use this logic only:

      IF [Open Dt (Month / Year)] <= MAX([Open Dt (Month / Year)])...

       

      How do I proceed with that ?