Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table with entry nos. which refer to a "from entry" and "to entry" numbers.
It looks like this:
No. | From entry No. | To entry No. |
99116 | 1778073 | 1778084 |
99117 | 1778085 | 1778088 |
99118 | 1778089 | 1778092 |
I like to transform the data to get the result like follows (I had a look into "Generating missing data", but failed).
No. | From Entry No. | To Entry No. |
99116 | 1778073 | 1778084 |
99116 | 1778074 | 1778084 |
99116 | 1778075 | 1778084 |
99116 | 1778076 | 1778084 |
99116 | 1778077 | 1778084 |
99116 | 1778078 | 1778084 |
99116 | 1778079 | 1778084 |
99116 | 1778080 | 1778084 |
99116 | 1778081 | 1778084 |
99116 | 1778082 | 1778084 |
99116 | 1778083 | 1778084 |
99116 | 1778084 | 1778084 |
99117 | 1778085 | 1778088 |
99117 | 1778086 | 1778088 |
99117 | 1778087 | 1778088 |
99117 | 1778088 | 1778088 |
99118 | 1778089 | 1778092 |
99118 | 1778090 | 1778092 |
99118 | 1778091 | 1778092 |
99118 | 1778092 | 1778092 |
Attached is a sample qvw, it would be great if someone could assist me.
Joerg
You should use a -1 in your expression. Something like this:
LOAD
No. ,
[From Entry No.]-1+ IterNo() as [From Entry No.] ,
[To Entry No.]
INLINE [
No.,From Entry No.,To Entry No.
99116,1778073,1778084
99117,1778085,1778088
99118,1778089,1778092
]
WHILE ([From Entry No.]-1+ IterNo()<=[To Entry No.])
;
Best regards
QlikView consultant at egbs consulting ab
Blog (in Swedish): bi-effekten.se
Thank you all for your help.
I solved it now, pls see attachment if of interest.
Jörg Hildebrandt: Great to hear that you got the help you needed. Please mark this issue as solved.
hello ,
please try dis.
LOAD * INLINE [
A1,B1,C1
99116,1778073,1778084
99117,1778085,1778088
99117,1778085,1778088
99118,1778089,1778092
];
u:
load min(A1) as g1 ,max(A1) as g2
Resident Test2;
let o=peek('g1');
let z=peek('g2');
for y= $(o) to $(z)
lo:
load A1 as A, min(B1) as T, max(C1) as K
Resident Test2
where A1=$(y)
group by A1;
let i=peek('A');
let m=peek('T');
let n=peek('K');
for j =$(m) to $(n)
Test:
LOAD
$(y) as P,
$(j) as q,
$(n) as v
AutoGenerate(1);
NEXT j;
drop Table lo;
NEXT y;
regards,
dattaram