4 Replies Latest reply: Sep 14, 2017 8:17 AM by Peter Cammaert RSS

    script error

    Viresh Kolagimath

      Hi All,

       

      Could you please let me know what is wrong in the below script. When i execute the below script, getting below error message.


      Error in expression:

      Year takes 1 parameter

       

      [InvExp Calendar]:

      LOAD DISTINCT

          Temp_Date as ExpiryDate,

          MonthStart(Temp_Date) as ExpiryMnthDate,

      Year(Temp_Date)   as [InvExpYear],

      Month(Temp_Date) as [InvExpMonth],

      Month(Temp_Date)&'-'&Date(Temp_Date, 'YY') as [InvExpMonthName],

      num(Month(DATE(Temp_Date,'DD/MM/YYYY')))        as [InvExpMonthNumber],

      Date(Temp_Date, 'YYYY-MM')   as [InvExpiryMonth],

      ((Year(Temp_Date) - Year($(vExpStartDate)))*12) + Num(Month(Temp_Date)) as InvExpRollingMonth;

       

      LOAD DISTINCT

      ($(vExpStartDate) + IterNo() - 1)   as Temp_Date

      AUTOGENERATE (1)

      WHILE $(vExpStartDate) + IterNo() - 1 <= $(vExpEndDate);

       

      Thank you.

       

      Regards,

      Viresh