Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlikers,
I am looking for the ability to automatically generate a table in my load script.
This table will have the first date of the month for the next 12 months (starting from todays date) - this much is straight forward.
However also within this table I want at the same time to add in some static data fields which will be the same for all records.
I really want to do this as one piece of code and was wondering if it were possible (example of the output below):
Date | ID | Data1 | Data2 | Data3 |
01/02/21 | F1 | workplan | Testing | Grey |
01/03/21 | F2 | workplan | Testing | Grey |
01/04/21 | F3 | workplan | Testing | Grey |
01/05/21 | F4 | workplan | Testing | Grey |
the first two columns need to increment (i.e. the date and the ID) however everything else stays the same.
Is this possible?
Maybe something like this:
load
date(addmonths(today(), recno()-1, 1) +1) as Date, 'F' & recno() as ID, '..' as Data1, '..' as Data2, '..' as Data3
autogenerate 12;
- Marcus