Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
arethaking
Creator II
Creator II

How to use peek/previous logic to this data?

Hi ,How to use peek/previous logic to this data?

Thanks in advance.

My source Data:

1.PNG

Requirement to show:

2.PNG

1 Solution

Accepted Solutions
effinty2112
Master
Master

Hi Aretha,

Try:

NoConcatenate

Data1:

load

Row,

Month,

if(IsNull(Month), Peek(Month1),Month) as Month1,

ID,

Description

Resident Data;

DROP Table Data;

You can drop Month and maybe rename Month1.

cheers

Andrew

View solution in original post

3 Replies
Anil_Babu_Samineni

Please share excel file

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
effinty2112
Master
Master

Hi Aretha,

Try:

NoConcatenate

Data1:

load

Row,

Month,

if(IsNull(Month), Peek(Month1),Month) as Month1,

ID,

Description

Resident Data;

DROP Table Data;

You can drop Month and maybe rename Month1.

cheers

Andrew

sunny_talwar

Another script, similar to Andrew

Data:

LOAD RowNo() as Row,

  If(Len(Trim(Month)) = 0, Peek('New_Month'), Month) as New_Month,

    ID,

    Description

FROM

[Sample Data.xlsx]

(ooxml, embedded labels, table is Data);

Capture.PNG