Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
prahlad_infy
Partner - Creator II
Partner - Creator II

Help in repeating a field value till a new value is found in same field ?

Hello Sirs ,

I do not know how should i recur a field value till it is encountered by new value ?

LOAD * INLINE [
F1, F2, F3
XO, 20, CONFIRMED
CO, 21,
XM, 22,
CM, NV,
X1O, 34, TRANSIT
C2O, 34,
XOM, NT,
CORM, NT,
XOR, 91, DELAYED
XONT, 33,
EXO, 22,
PROG, 1,
];

like the below table for field F3  i am wanting to repeat value for the above data while loading 

F1F2F3
XO20CONFIRMED
CO21CONFIRMED
XM22CONFIRMED
CMNVCONFIRMED
X1O34TRANSIT
C2O34TRANSIT
XOMNTTRANSIT
CORMNTTRANSIT
XOR91DELAYED
XONT33DELAYED
EXO22DELAYED
PROG1DELAYED

 

Please help .

Thanks

1 Solution

Accepted Solutions
anushree1
Specialist II
Specialist II

Please check the attached

View solution in original post

2 Replies
anushree1
Specialist II
Specialist II

Please check the attached

raman_rastogi
Partner - Creator III
Partner - Creator III

Try this

DataTemp:
Load F1,
F2,
if(len(F3)<=0,Peek(F3),F3) as F3;
LOAD * INLINE [
F1, F2, F3
XO, 20, CONFIRMED
CO, 21,
XM, 22,
CM, NV,
X1O, 34, TRANSIT
C2O, 34,
XOM, NT,
CORM, NT,
XOR, 91, DELAYED
XONT, 33,
EXO, 22,
PROG, 1,
];

Regards

Raman