Discussion board where members can get started with QlikView.
I have written a function to calculate the performance bounce.
function Partner_policy( rt , ctr)
dim temprtdim tempctr
if (temprt<80 and tempctr<65) thentemp=temprt
elseif ((temprt>=80 and temprt<85) and ctr<65) thentemp=70elseif ((temprt>=85 and temprt<90) and ctr<65) thentemp=75end if
Now i the rt & ctr loaded in straight table. so i want this performance bounce to be loaded in straight table can anyone help me in this.
Go to Solution.
Create a variable like this
SET Expression = if ($1<80 and $2<65), rt,
if ($1>=80 and $1<85 and $2<65, 70,
if ($1>=85 and $1<90 and $2<65, 75)))
and use this variable in the expression of straight table
Refer http://community.qlik.com/docs/DOC-3836 for help.
This calculates the performance in straight table itself.
As per Gysbert Wassenaar suggestion it is better calculate in the script itself.
Hope this helps you.
You cannot use the function in a straight table. And you don't need the function in the script. Create a new field in the script:
if (rt<80 and ctr<65), rt,
if (rt>=80 and rt<85 and ctr<65, 70,
if (rt>=85 and rt<90 and ctr<65, 75))) as Partner_policy
thnks a lot.. it is perfect.