Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Experts,
I have a table of quarterly sales data. I am trying to generate additional rows for multiple quarters into the future.
Sample existing records:
03/31/2021 | 100 |
06/30/2021 | 105 |
09/30/2021 | 109 |
12/31/2021 | 112 |
03/31/2022 | 115 |
06/30/2022 | 120 |
How can I use the load script to create estimated future records? (without using an inline load)
Thank you!
Assuming existing column names of "Quarter" and "Value", how about:
Concatenate (BaseTable)
LOAD
Date(AddMonths(MaxQuarter, IterNo()*3)) as Quarter,
0 as Value
While IterNo() <= 4 // Add 4 more Quarters
;
LOAD
Max(Quarter) as MaxQuarter
Resident BaseTable;
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
Assuming existing column names of "Quarter" and "Value", how about:
Concatenate (BaseTable)
LOAD
Date(AddMonths(MaxQuarter, IterNo()*3)) as Quarter,
0 as Value
While IterNo() <= 4 // Add 4 more Quarters
;
LOAD
Max(Quarter) as MaxQuarter
Resident BaseTable;
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
It is an honor to receive an assist from the man in the white hat.
Very much appreciate the help, Rob!
DM