4 Replies Latest reply: Jan 20, 2015 4:14 AM by varun raj RSS

    Setting and using variables

      Hi All,

       

      I am new to QlikView and am stuck with an issue in the script side.

      I need to create a variable and store a value, only to be used by the next LOAD statement.

       

      Here is how it goes.

      FACT:

      LOAD fields from FACT.qvd;

       

      SET CYEAR=FACT.FISCAL_YEAR;

       

      DIM:

      IF($(CYEAR)-DIM.FISCAL_YEAR=0,DIM.FISCAL_WEEK,0)

      FROM DIM.qvd;

       

      The issue is that the $(CYEAR) is replaced by FACT.FISCAL_YEAR when the application is refreshed. And it pops up an error message that the field is not found.

       

      Thanks for your help..