4 Replies Latest reply: Dec 13, 2011 8:26 AM by kim.l.olsen RSS

    Using a variable as a global expression and putting it outside QV applications

      Hi.

       

      I have a solution that - as I see it - is pretty neat.

       

      In a lot of applications I present the same KPI's. I build it so that I make a QVD file containing all relevant metrics (for instance no. calls, total handling times, etc.). I load these into different applications, and in different objects I calculate the KPI's based on the metrics. That is, I have defined what expressions that are used in which calculations, and by a long if statement, I ask QlikView to calculate the KPI values distributed on different dimensions.

       

      This works really good, but for the ease of it, I put the long if statement into a variable and then calls this in the objects.

       

      My question is, whether anyone knows whether or not you can put this variable into the load script of the applications. I am think using something like

       

      LET Value = .... (if statement).

       

      But the thing is that it contains a lot of ' and so one that the load script misinterpret.

       

      So, I am think - also to have only one place to maitain this if statement - to put the if statement into a type of include file... (qv script file .qvs).

       

      But does anyone know how to do this?

       

       

      If so, how do I make the script of the 'if' statement so that QlikView automatically loads the if statement as a variable in the aplications including the include file (.qvs)?

       

       

       

      Cheers!