4 Replies Latest reply on Sep 18, 2018 8:10 AM by John Salazar

    How to compare previous value in a measure with a number

    John Salazar

      I have a measure called [Turbulence] and I am trying to created a calculated field that returns a value if the previous [Turbulence] value is negative.


      For my calculated field, I did this:


      IF LOOKUP(ATTR([Turbulence]), -1) < 0

      THEN [52 Week Change]



      But I get this error when I try to create the field.

      Cannot mix aggregate and non-aggregate comparisons or results in 'IF' expressions"


      Any idea why this is happening and how I can fix it?