Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Is this possible to do in the script?
Probably. Can you post a Qlikview document with the script and the pivot table?
Load *,
if(SumAmt <= 700000, SumAmt*.0000,
if(SumAmt > 700000 and SumAmt <= 1100000, SumAmt*.0005,
if(SumAmt > 1100000 and SumAmt <= 1500000, SumAmt*.0010,
if(SumAmt > 1500000 and SumAmt <= 2000000, SumAmt*.0020,
if(SumAmt > 2000000, SumAmt*.0030)))));
Load Person, Sum(amount) As SumAmt Resident Source;