10 Replies Latest reply on Jun 3, 2016 5:27 PM by Mahfooj Khan

    getting can-not mix aggregate and non aggregate arguments error when using dates and sum in LOD

    Revati Khopkar

      I had this LOD calc which was working just fine.

       

      {

          include

          [Employee]:

          (if

              sum([Totalhours]) <= 100

              then 1 else 0 end)

      }

       

      Then, the business logic changed and I had to add one more condition. But adding this condition gave me an error of "can-not mix aggregate and non aggregate arguments with this function" . How do I resolve this? I tried adding attr before date fields, but Tableau doesn't allow using attr in LOD.

      {

          include

          [Employee]:

          (if

              (

                sum([Totalhours]) <= 100

                and

                [Term Date] < Prgm End Date]

              )

           then 1 else 0 end)

      }