6 Replies Latest reply: Apr 8, 2016 7:25 AM by Helga Ventura RSS

    Variables in Load Scrip - How to do it in Qlik Sense

    Helga Ventura

      Hello,

       

      I'm having a problem when I try to create a variable with calculations and set anaysis in load script.

       

      I've an huge expression (250 lines and 8000 characters) that I can't finished it because i've no space to do it and i need to do it in load script.

       

      How can I do it in Qlik Sense?

       

      My expression in front end is:

      Sum({<DateNum={">=$(=$(vInitialDate))<=$(=$(vFinalDate))"},COD_RUB_DR = {'RES_SUBEXP'}>}MTR_SALDO_FINAL)

       

      where

      $(vInitialDate) ---> SET vInitialDate= num(MakeDate(year(today()),1,1));


      $(vFinalDate) ---> SET vFinalDate= num(MonthEnd(AddMonths(Today(),-1)));



      I've done in load Script like this:


      SET vTeste = '(Sum({<DateNum={">=$((vDataIniSemSelec))<=$((vDataFimMesAntSemSelect))"}, COD_RUBRICA_DR = {"RES_SUBEXP"}>}MTR_SALDO_FINAL))';


      Can anyone help me with this??


      Best regards,


      Helga