Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
omyahamburg
Creator II
Creator II

How to tranform table/generate data

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.
9911617780731778084
9911717780851778088
9911817780891778092

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.
9911617780731778084
9911617780741778084
9911617780751778084
9911617780761778084
9911617780771778084
9911617780781778084
9911617780791778084
9911617780801778084
9911617780811778084
9911617780821778084
9911617780831778084
9911617780841778084
9911717780851778088
9911717780861778088
9911717780871778088
9911717780881778088
9911817780891778092
9911817780901778092
9911817780911778092
9911817780921778092

Attached is a sample qvw, it would be great if someone could assist me.

Joerg

13 Replies
Vegar
MVP
MVP

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

Vegar Lie Arntsen

QlikView consultant at egbs consulting ab

Blog (in Swedish): bi-effekten.se

omyahamburg
Creator II
Creator II
Author

Thank you all for your help.

I solved it now, pls see attachment if of interest.

Vegar
MVP
MVP

Jörg Hildebrandt: Great to hear that you got the help you needed. Please mark this issue as solved.

Not applicable

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