Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

change the already loaded field

Hi,

tell me please,is it possible to change an already loaded field? couldn't find such a function.. While working with debts i need to reduce earlier loaded credit field, while gettng a new debit field.. I'm lookup'ing an active credit(there is a flag, that shows that it's not repaid yet) and then, when i use a part of the credit to repay a new debit issue, i need to raduce the credit value/

I can get its index by the FieldIndex, but how to change the value?....

Thanks in advance

6 Replies
gmoraleswit
Partner - Creator II
Partner - Creator II

Hi Alexa

I'm not sure if I understand your question... you can calculate the new credit value on the load script, something like this:

Load ...

     ActiveCredit,

     if(ActiveCredit, CreditValue - DebitIssue, CreditValue) as CreditValue

      CreditValue  as OriginalCreditValue

...

from...

Please upload some sample data and/or screen shots in order to give you a most accurate solution.

Regards

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Have you tried using an InputField? Problem is when you reload the data the changes will be lost. QlikView is a reporting tool, not a data input/transactional tool.

Jason

Not applicable
Author

Hi, Jason. InputTool is not what i need actually...., i need to do it all in the script, while loading... Its a part of app, that calculates debts by periods..

I need to see debts of partners, dew to their "age": wich debts are less then month, which 1-3 months, which 3-6 months... (the best- to be able to choose the limits in the app by user....) User want to see it in different lines or colours of bars..

the payment scheme is FIFO: the new cash transfer goes to repay the oldest debt... So there are "steps"...

Because of that i try to calculate the sum of credit available, but need to scan already loaded data to see, if it was used already...

I need to receive smth like marked in yellow in the endScreenshot_1.png

Not applicable
Author

Hi, Gabriela.thank you for your responce!  the fact is that I need to do it not linear, but with previously loaded data...

I'll be very gratefull, if you could look at files, attached below in responce to Jason

Jason_Michaelides
Luminary Alumni
Luminary Alumni

If you want the limits to be set by the user you can't do this in the script (unless the limits are set in another system or spreadsheet or something).

Can you provide an example of some input data (not a screenshot) and exactly how you want the output to look?

Thanks,

Jason

Not applicable
Author

to make the period is dinamyc, I thought its possible to make a table of pairs debt-debt_start in a script, and then  calculate the "age" of the debt in a chart already....

i've got an advice to use class() function in a calculated dimension and it will bucket the days into ranges (0-30 , 31-60 etc..).. but the problem is to calculate the "steps", appearing when not all debt is repaied.

For ex, they paid us 100000 01.01.14 (its our credit), then we gave tehm smth,  that cost 50000  on 02.01.14 (our debit), then we gave them some production costing 150000 on 10.01.14 and their debt to us is now100000. they dont pay us for a month. the age of debt 100000 is month. Then on 11.02.2014 they pay us 50000, so on the 11.02.14 their debt is 50000, but its age is still 50000. then we give them some production costing 25000 on 11.02.14/ so on 12.02 their debts are 50000 with age 32 days and 25000 with  age 1 day.. then they pay us 25000 on 13.02, it goes to repay the oldest debt. they have 25000 with age 33 days and 25000 with age 2 days.... and so on...

Woul be VERY grateful if you share an idea of solving a problem/ my sample data and app is attached. Regards, Alexa