Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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.

0 Replies