2 Replies Latest reply: Apr 9, 2015 12:41 AM by anbu cheliyan

# Replicate this expression in script?

Hi everyone,

Listed below is an expression that I am using in one of my pivot tables. I am wondering if it is possible to replicate this in the script and create a column that does the same thing.

if(sum(TOTAL <Person> amount) <= 700000, sum(amount*.0000),

if(sum(TOTAL <Person> amount) > 700000 and sum(TOTAL <Person> amount) <= 1100000, sum(amount*.0005),

if(sum(TOTAL <Person> amount) > 1100000 and sum(TOTAL <Person> amount) <= 1500000, sum(amount*.0010),

if(sum(TOTAL <Person> amount) > 1500000 and sum(TOTAL <Person> amount) <= 2000000, sum(amount*.0020),

if(sum(TOTAL <Person> amount) > 2000000, sum(amount*.0030))))))

Basically what I am trying to do is sum all of the loan values that apply to a specific person on a specific close date and then assign a corresponding field value for each row.

So for example, if Person A has 7 loans that closed on March 31st, 2015 and the total of those 7 loans is 1000000 the new field will display whatever the loan amount is for each given loan * .0005.

Is this possible to do in the script?

Thank you

• ###### Re: Replicate this expression in script?
Is this possible to do in the script?

Probably. Can you post a Qlikview document with the script and the pivot table?