14 Replies Latest reply on Jun 23, 2016 12:32 AM by Ashish Chaudhari

    Cannot mix aggregate and non aggregate comparisons or results in if

    Sandeep Tiwari

      IF [Time Frame] = "open"

      THEN STR(([End Hours]-[Start Hours Range ])* [No. of days till Open to Now])

       

       

      ELSEIF [Time Frame] = "Current Month"

      THEN

           IF YEAR([Started On]) = YEAR(TODAY()) AND MONTH([Started On]) = MONTH(TODAY())

           THEN STR(([End Hours]-[Start Hours Range ])*INT(day(TODAY())))

           ENd

      END

       


      and [No. of days till Open to Now] =DATEDIFF('day',MIN([Created On]),TODAY())   

       

      I got suggestion that we can use ATTR() to remove this error also it working  fine fro

      IF [Time Frame] = ATTR("open")

      THEN STR(([End Hours]-[Start Hours Range ])* [No. of days till Open to Now])
      END

       

       

       

      but i have other if else statement here and it's nested one i am not able to use ATTR()  in thje inner one .Andrew Watson

      Ashish ChaudhariMark Fraser