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: 
nico_ilog
Partner - Creator II
Partner - Creator II

Understanding if a LINK exists?

Good Day Qlik Community!

I have a scenario that i'm struggling with?

If i have these 2 Data Sets:

Table 1:

ID     |     Desc     |

1          xxx

2          xxx    

3          xxx

4          xxx

5          xxx

Table 2:

ID     |     Desc     |

2          xxx    

3          xxx

5          xxx

Therefore IDs: 2, 3, 5 will have links.

How can i create a flag, 2 options: Linked and Not Linked?

In the actual scenario a situation of: Invoiced, not invoiced?

Any/all responses will be appreciated.

Nico

Labels (1)
5 Replies
Anonymous
Not applicable

Table2Map:

MAPPING LOAD

     ID,

     Desc

FROM Data Source;

Table1:

LOAD

     IF(ISNULL(APPLYMAP('Table2Map',ID,NULL())),'Not Linked','Linked') as _linkFlag

     ID,

     Desc,

FROM Data Source;

Table2 ...etc.

alexandros17
Partner - Champion III
Partner - Champion III

If you have all values from table 2 contained in table 1 then simply :

MyTabTemp:

load id, desc1 from table1

left join

load id, desc2, '1' as flag  from table2;

Where you find '1' values as flag there is a link ...

Let me know

nico_ilog
Partner - Creator II
Partner - Creator II
Author

Using the Resident Function?

Anonymous
Not applicable

Table1:

Load

     ID,

     Desc

FROM Date Source;   

Left Join

Table 2:

Load

     ID,

     Desc,

     'Linked' as _tempflag

From Data Source;

Load

     ID

     Desc,

     IF(_tempflag='Linked','Linked','Not Linked') as _flag

Resident Table1;

nico_ilog
Partner - Creator II
Partner - Creator II
Author

Perfect!

Changed it up a bit! But works like a charm!

Thumbs up!

Michael Gardner wrote:

Table1:

Load

     ID,

     Desc

FROM Date Source;  

Left Join

Table 2:

Load

     ID,

     Desc,

     'Linked' as _tempflag

From Data Source;

Load

     ID

     Desc,

     IF(_tempflag='Linked','Linked','Not Linked') as _flag

Resident Table1;