Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
psk180590
Creator III
Creator III

Peek or LookUp

Hello All,

I have the following data

Header 1Header 2
SubjectValue
A1

Header 1Header 2
SubjectValue
A2
B2
C3
D3

In the first Table Since the Value of Subject A is ! i have no more entries, but in Table 2 Since the Value of A is 2 i have further more entries.

I have a requiriment where i need to add the other Three Subjects(B,C,D...) with Value 1 against each of them.

I'm not sure whether Peek or Lookup would suit my requiriment here.

Expected Result:

Header 1Header 2
SubjectValue
A1
B1
C1
D1
A2
B2
C3
D3

Please help me out!!

Labels (1)
2 Replies
Digvijay_Singh
MVP
MVP

May be this -

Table2:

LOAD Subject,

    Value

FROM

[https://community.qlik.com/thread/299420]

(html, codepage is 1252, embedded labels, table is @2, filters(

Remove(Row, Pos(Top, 1))

));


Concatenate

Load Subject

Resident Table2;


NoConcatenate


Table1:

LOAD Subject,

    Value

FROM

[https://community.qlik.com/thread/299420]

(html, codepage is 1252, embedded labels, table is @1, filters(

Remove(Row, Pos(Top, 1))

));


Let Valuevar = Peek('Value',0,'Table1');

NoConcatenate

Final:

Load Subject,

If(Len(Value)=0,'$(Valuevar)',Value) as Value

Resident Table2;


Drop table Table1,Table2;

Let Valuevar =;


Capture.PNG

vinieme12
Champion III
Champion III

Why not Just

Temp:

LOAD

    Value

FROM

[https://community.qlik.com/thread/299420]

(html, codepage is 1252, embedded labels, table is @1, filters(

Remove(Row, Pos(Top, 1))

));

Table:

LOAD Subject,

    Peek('Value',0,'Temp') as Value

FROM

[https://community.qlik.com/thread/299420]

(html, codepage is 1252, embedded labels, table is @2, filters(

Remove(Row, Pos(Top, 1))

));

Concatenate

Table:

LOAD Subject,

    Value

FROM

[https://community.qlik.com/thread/299420]

(html, codepage is 1252, embedded labels, table is @2, filters(

Remove(Row, Pos(Top, 1))

));

Drop table Temp;

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.