0 Replies Latest reply: Dec 31, 2014 1:00 AM by manura Dissanayake RSS

    QlikSense - Variables in load editor and measures

      Dear all,


      I'm having trouble with defining a variable and reuse it in sum & avg functions.

      I tried this inside script editor and measures. both attempts not giving results.

      My requirement is to calculate a ratio using given counters and then reuse this ratio to get the Zvalue (normalised values for ratio).


      Under scrip editor I have defined below

      set MOCSFR=100*(sum([MOC Call Drop])/sum([MOC Call Connected]));

      set MOCSFR2 = if(sum([MOC Call Attempts]) > 0, ($(MOCSFR)),0);

      set ZMOCSFR = (($(MOCSFR2)) - (avg(ALL $(MOCSFR2))) )/(stdev (ALL $(MOCSFR2)) );


      I could recall $(MOCSFR) and &(MOCSFR2) in measures which gives calculated values.

      However $(ZMOCSFR) does not return any value.

      also below expression defined in measures also does not return any value.

      sum(if(sum([MOC Call Connected]) > 0, $(MOCSFR),0))


      Kindly assist.