Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Kwame
Contributor III
Contributor III

Autogenerate from resident data

Greetings guys,

I wish to create records from an exisitng table where the transaction date changes and then combined altogether.

Existing Table:

Date  ID  Amount
24/03/2022 100023 2704.73
24/03/2022 112345 357.09

 

Desired table:

Date  ID  Amount
24/03/2022 100023 2704.73
24/03/2022 112345 357.09
25/03/2022 100023 2704.73
25/03/2022 112345 357.09
1 Solution

Accepted Solutions
Or
MVP
MVP

Generally speaking, have a look at this post: https://community.qlik.com/t5/Qlik-Design-Blog/How-to-populate-a-sparsely-populated-field/ba-p/14706... or this technical brief: https://community.qlik.com/t5/QlikView-Documents/Generating-Missing-Data-In-QlikView/ta-p/1491394

Note that in your case you may want to replace the existing Max(Date) logic with Today(), but otherwise this appears to cover your exact use case.

Insofar as this specific case, you could probably use the code I already posted contained within a loop. An approximation would be:

Let vDate= Date#('24/03/2022');

Do while vDate<= Today()

Load Date(vDate+1) as Date, ID, Amount

Resident YourTable

Where Date = '24/03/2022';

Let vDate = vDate+1;

Loop

 

View solution in original post

7 Replies
Or
MVP
MVP

Load Date(Date+1) as Date, ID, Amount

Resident YourTable

Where Date = '24/03/2022';

Kwame
Contributor III
Contributor III
Author

Thanks @Or , however the requirement is to auto generate with daily date as show below;

Date  ID  Amount
24/03/2022 100023 2704.73
24/03/2022 112345 357.09
25/03/2022 100023 2704.73
25/03/2022 112345 357.09
26/03/2022 100023 2704.73
26/03/2022 112345 357.09
27/03/2022 100023 2704.73
27/03/2022 112345 357.09
28/03/2022 100023 2704.73
28/03/2023 112345 357.09
Or
MVP
MVP

Generally speaking, have a look at this post: https://community.qlik.com/t5/Qlik-Design-Blog/How-to-populate-a-sparsely-populated-field/ba-p/14706... or this technical brief: https://community.qlik.com/t5/QlikView-Documents/Generating-Missing-Data-In-QlikView/ta-p/1491394

Note that in your case you may want to replace the existing Max(Date) logic with Today(), but otherwise this appears to cover your exact use case.

Insofar as this specific case, you could probably use the code I already posted contained within a loop. An approximation would be:

Let vDate= Date#('24/03/2022');

Do while vDate<= Today()

Load Date(vDate+1) as Date, ID, Amount

Resident YourTable

Where Date = '24/03/2022';

Let vDate = vDate+1;

Loop

 

Kwame
Contributor III
Contributor III
Author

Hi @Or  I have been at this for a week now, and still can't get my head around. 

Would you be kind enough to shed more light, I'd really appreciate that.

Thank you.

Or
MVP
MVP

I'm afraid it's hard to clarify something if I don't know what it is you don't understand... in this case it's a relatively simple loop which starts on a specific date and then loads the data from that date into the next date, repeating until it reaches today.

MarcoWedel

Can you show what you already tried and describe the issues you had in doing so?

Hill69
Contributor II
Contributor II


@Kwame wrote: ChoiceADVANTAGE.com

Greetings guys,

I wish to create records from an exisitng table where the transaction date changes and then combined altogether.

Existing Table:

Date  ID  Amount
24/03/2022 100023 2704.73
24/03/2022 112345 357.09

 

Desired table:

Date  ID  Amount
24/03/2022 100023 2704.73
24/03/2022 112345 357.09
25/03/2022 100023 2704.73
25/03/2022 112345 357.09

In your case you may want to replace the existing Max(Date) logic with Today(), but otherwise this appears to cover your exact use case.