4 Replies Latest reply on Feb 21, 2018 1:31 AM by Tushar More

    Cannot Mix Aggregate and Non Aggregate Expressions or Results in IF Expr

    Sajal Roy

      Hello Community ,

                        I have created 2 calculated fields:

       

      %Open

       

      Role:

      Continuous Measure

      Type:

      Calculated Field

      Status:

      Valid

      Formula

      (SUM([Open])/COUNT([IRA No.]))*100

       

      diff_date

       

      Role:

      Continuous Measure

      Type:

      Calculated Field

      Status:

      Valid

      Formula

      DATEDIFF('day' , ATTR([Due date (Act.)]) , ATTR(TODAY()))

       

      Both are valid calculations. Now I am creating a calculated field which will helps me change color of object .

       

      IF [Corrective action exists]='No' AND [Due date (Act.)] > TODAY() THEN 'Red'

        ELSEIF ([%Open] >= 5  AND [diff_date] < 30) THEN 'Yellow'

      ELSE ' Green'

      END

       

      I am getting a "Cannot Mix Aggregate and Non Aggregate Expressions or Results in IF Expr" error when I create this expression. 

       

      How can I make the calculation valid ?