6 Replies Latest reply: Jan 13, 2015 4:20 AM by Stefano Angarano RSS

    Invalid expression problem

      Hi. I'm trying to calculate the CC returns from my script. This is the part of the script:

       

      AZIONI_3:

      NoConcatenate load

      *,

      if (Azione=peek(Azione,-1), peek([Adj Close],-1),'-') as Val_close_prec

      resident AZIONI_2;

       

       

      drop table AZIONI_2;

       

       

      CC:

      NoConcatenate load

      *,

      -log((Avg(Val_close_prec)))+log(Avg([Adj Close])) as CC

      Resident AZIONI_3;

       

       

      When i run it it shows this error:

      Invalid expression

      CC:

      NoConcatenate LOAD

      *,

      -log((Avg(Val_close_prec)))+log(Avg([Adj Close])) as CC

      Resident AZIONI_3

       

      I don't understand where the problem is! When i use that formula as expression in a pivot table it works...

      Can somebody explain the error to me?