13 Replies Latest reply: Jan 7, 2013 5:16 PM by Jenn B RSS

    How can I define these variables in the script?

      I would like to make a #Include script that returns these variabls:

      • vCurQtr = Text(Year(Today())+Max(CurYr)) & '-' & concat(CurrQtr)
      • cCurYrYr = Text(Year(Today())+Max(CurYr))
      • vQOQQtr =  Text(Year(Today())+Max(PriorYr)) & '-' & concat(PriorQtr)
      • vPriorPriorQtr = Text(Year(Today())+Max(PriorPriorYr)) & '-' & concat(PriorPriorQrt)
      • vPriorPriorPriorQtr = Text(Year(Today())+Max(PriorPriorPriorYr)) & '-' & concat(PriorPriorPriorQrt)
      • vYOYQtr = Text(Year(Today())+Max(CurYr)-1) & '-' & concat(CurrQtr)
      • vCurQOQYOY_Qtr = '(' & vCurQtr & ' | ' & vQOQQtr & ')'
      • vRollingQtrs_4 = '(' & vCurQtr & ' | ' & vQOQQtr & ' | ' & vPriorPriorQtr & ' | ' & vPriorPriorPriorQtr & ')'
      • vCurYr = '(' & vCurYrYr & '-Q1 | ' & vCurYrYr & '-Q2 | ' & vCurYrYr & '-Q3 | ' & vCurYrYr & '-Q4)'

       

      Right now I have had to define these in the Variable Overview so I would have to define these on every document that uses these variables.  Is there a way to make this a script that loads my table (see attached QlikView and XLS) and then creates these variables and then drops the table?

       

      Thank you very much!