Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Team,
I am trying to repeat Rows in qlikview based on the below screenshot. Each row should be repeated based on the difference between From and To Date as shown in expected output screenshot.
I have also attached qlikview file where i attempted using WHILE ITERATION but i am not getting through.
Can you please check and correct the issue in that qlikview file
INPUT
Expected OUTPUT
Can you try something like while loop
New:
Directory;
LOAD From, To,Product,Sales%
FROM
From_To.xlsx
(ooxml, embedded labels, table is Input);
NoConcatenate
New_1:
load Product,Sales%, Date(From + IterNo()) as Date
resident New
WHILE From + IterNo() -1<= To;
Drop table New;
Use this in your script. highlighted the changed parts
New_1:
LOAD
Date(From+IterNo()) as Date, //not sure why you were adding months basing this on your desired output
Product,
Sales%
While From + IterNo() <= To;
Load *
Resident New;
output
Date | Product | Sales% |
---|---|---|
19-10-2018 | A | 0.1 |
20-10-2018 | A | 0.1 |
21-10-2018 | A | 0.1 |
22-10-2018 | A | 0.1 |
23-10-2018 | A | 0.1 |
24-10-2018 | A | 0.1 |
25-10-2018 | A | 0.1 |
19-10-2018 | B | 0.2 |
20-10-2018 | B | 0.2 |
21-10-2018 | B | 0.2 |
22-10-2018 | B | 0.2 |
23-10-2018 | B | 0.2 |
24-10-2018 | B | 0.2 |
25-10-2018 | B | 0.2 |
26-10-2018 | B | 0.2 |
27-10-2018 | B | 0.2 |
28-10-2018 | B | 0.2 |
29-10-2018 | B | 0.2 |
30-10-2018 | B | 0.2 |
31-10-2018 | B | 0.2 |
01-11-2018 | B | 0.2 |
19-10-2018 | C | -0.1 |
20-10-2018 | C | -0.1 |
21-10-2018 | C | -0.1 |
22-10-2018 | C | -0.1 |
23-10-2018 | C | -0.1 |
24-10-2018 | C | -0.1 |
25-10-2018 | C | -0.1 |
26-10-2018 | C | -0.1 |
27-10-2018 | C | -0.1 |
28-10-2018 | C | -0.1 |
29-10-2018 | C | -0.1 |
30-10-2018 | C | -0.1 |
31-10-2018 | C | -0.1 |
01-11-2018 | C | -0.1 |
02-11-2018 | C | -0.1 |
03-11-2018 | C | -0.1 |
04-11-2018 | C | -0.1 |
05-11-2018 | C | -0.1 |
hi
use this script :
New:
LOAD From, To,
date(From +IterNo()-1) as Date,
Product,
Sales%
FROM
From_To.xlsx
(ooxml, embedded labels, table is Input)
while From+IterNo()-1<=To;
Can you try something like while loop
New:
Directory;
LOAD From, To,Product,Sales%
FROM
From_To.xlsx
(ooxml, embedded labels, table is Input);
NoConcatenate
New_1:
load Product,Sales%, Date(From + IterNo()) as Date
resident New
WHILE From + IterNo() -1<= To;
Drop table New;
LOAD From,
Date( From + IterNo()-1) as Date,
To,
Product,
Sales%
FROM
[..\Desktop\From_To.xlsx]
(ooxml, embedded labels, table is Input) While IterNo() <= To - From + 1 ;