Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Autogenerate from Resident Table

Hi Guys and Gals,

I'm having some trouble trying to figure this one out and would like some help achieving this output.

I have a resident table with say 3 account fields, 3 account values and 3 account dates

AccountField, AccountValue, AccountDate

A, 100, 2010/10/01

B, 200, 2010/10/01

C, 300, 2010/10/01

In the front end of the report there is 6 variables ( 2 by 3) that I want to apply an increase to the above AccountValue fields that the EU will decide.

So variable 1 will be for account A and says apply increase in Mar {Mar being the actual value they have selected}, variable 2 will say select the amount that the variable must increase by, EU select 5% {5% the value the accountvalue will increase by}

I want to autogenerate based on this above information a table of values taking into account these input fields. The last condition is that this information is annual and that the % increase will always be applied to the last value in the month before it applies. Below is an output example of account A

AccountField, AccountValue, AccountDate

A, 100, 2010/10/01

A, 100, 2010/11/01

A, 100, 2010/12/01

A, 100, 2011/01/01

A, 100, 2011/02/01

A, 105, 2011/03/01

A, 105, 2011/04/01

.

.

.

.

.

.

A, 105, 2012/02/01

A, 110.25,2012/03/01

and so forth for the number of months i want to autogenerate for. I'm really hoping there is someone out there that has attempted this type of autogenerate off some preloaded information and applied inputs as illustrated above.

Thanking all in advance

Cheers,

Byron

1 Solution

Accepted Solutions
vincent_ardiet
Specialist
Specialist

Hi,

May be you should try to write a loop (with a do...loop or a for...next) instead of an autogenerate ?

On each iteration you can test the month and concatenate a new line in your target table.

Regards,

Vincent

View solution in original post

6 Replies
vincent_ardiet
Specialist
Specialist

Hi,

May be you should try to write a loop (with a do...loop or a for...next) instead of an autogenerate ?

On each iteration you can test the month and concatenate a new line in your target table.

Regards,

Vincent

Not applicable
Author

Hi Vincent,

Thanks for your reply, I haven't yet used a for while loop I know shocking lol, but none-the-less will read up on it and give it a try. In the mean time was playing around a bit and the while ... iterno() seems to be doing a pretty good job atm in 'generating' additional fields as I would like them, but will be tricky once i start to include the variables.

Anyway, let me stop waffling, going to read up on the do while loop now and let you know how successful that was!

Cheers,

Byron

Not applicable
Author

the for while loop did achieve what I was looking for. I am just completing the script and will be posting the qv file for anyone coming across this post as the script solution for this problem

Kind regards,

Byron

Anonymous
Not applicable
Author

Hi Byron,

Would you be so kind as to post the script? I have a similar conceptual problem.

Thanks,

Antoine

Not applicable
Author

Hi Antoine,

I actually resolved this quite a while ago. Will have a look for the script and post it here for you. Hope it is what you were looking for

Cheers,
Byron

Anonymous
Not applicable
Author

Hi Byron,

Thanks alot.

I managed to solve it using IterNo() function. Îf you have an alternative manner, I would more than happy since I am looking at generating quite some considerable amount of records (optimise )

Thanks,
Antoine