11 Replies Latest reply: Feb 28, 2017 10:00 AM by Kaushik Solanki RSS

    Qlik Sense: Use of loaded measures in script

    Demian Rebollo

      Hi there!

       

      I need help with the following issue.

       

      To make things simple, I have a similar script as the one here:

       

      LOAD

          BusinessUnit,

          YTD,

          Pipeline

      FROM xxx....;

       

      but to create a stacked bar chart I need a new measure dependent on the ones I am loading first, so I need the following to work:

       

      LOAD

          BusinessUnit,

          YTD,

          Pipeline,

          YTD - Pipeline as RunRate

       

      FROM xxx....;

       

      The data load of this script is successful with no errors, but RunRate has no values

      I have tried to load variable names and their formulae from a script, which outputs the same result with only an additional step that provides no added value.

       

      If I create a table visualization using the either script and in the measure fx field I use YTD-Pipeline (not the RunRate measure) it shows the correct values...

       

      If I create a measure defining it in the Measures tab, it also works fine. However, I am not able to use it to create my stacked bar chart because defined like that it does calculate the values but it does not belong to any table...

       

      I also tried a RESIDENT LOAD trying to add RunRate as follows:

       

      TempTable:

      LOAD

          BusinessUnit,

          YTD,

          Pipeline

      FROM xxx....;

       

      FinalTable:

      LOAD

          BusinessUnit,

          YTD,

          Pipeline,

          YTD-Pipeline as RunRate

      RESIDENT TempTable;

       

       

      But that gives the very same results: no values in RunRate...

       

      The goal is to be able to re-use measures in the load script.

       

      Does anyone have a hint? It will be much appreciated. Thanks!