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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Femke_DPG
Contributor III
Contributor III

How to only view records with 1 source

Hi, I need your help quite urgently. 

I have 2 sources, so 2 fields with the name 'code'. I need to compare them so I added a 'flag' into the sources: 'Source 1' as Flag and 'source 2' as Flag. 

I need to find the codes who only have 'source 1'. So they are missing in source 2. 

All those codes have 2 sources in this example: source 1 and 2. 

Femke_DPG_0-1715609582473.png

I only need the codes with source 1 (and not source 2). 

load script example (basic):

load 

code as 'check code'

Source 1 as Flag

From source 1

 

load 

code as 'Check code'

Source 2 as Flag

From source 2

 

If I filter on dimension 'Flag' on  'source 1' and select a code, then I remove the filter 'source 1' (so only the code filter left), then there are 2 sources: source 1 and source 2.. Those are the codes I DON'T need.. 

 

Can anyone please help me? 

Many thanks! 

 

Labels (1)
1 Reply
WaltShpuntoff
Employee
Employee

You just need one more step:

FlagList:

Noconcatenate

Load [Check Code], Concat(distinct Flag, ', ') as CombinedFlags

resident <yourTableName>

Group by [Check Code];

The field CombinedFlags will contain either 'Source 1' or 'Source 2' or 'Source 1', 'Source 2'

HTH

ws