4 Replies Latest reply on Jan 9, 2019 8:44 PM by Naveen B

    Cannot Mix Aggregate and Non- Aggregate Comparisons or results in IF expressions

    Vicky Lou

      Hi all,

       

      Can someone troubleshoot this calculated field for me? I am trying to get the Orders sold for the previous week using this calculated formula but this error shows up

       

      Cannot Mix Aggregate and Non- Aggregate Comparisons or results in IF expressions

       

      below is the calculated field I used:

       

      IF DATETRUNC('week',[Order Created At])=DATETRUNC('week',DATEADD('week',-1,TODAY()))

      THEN [Orders bCancellation]

      END

       

      Thank you!