Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I am relatively new to Qlikview and coming from an SqlServer BI background. I am loading data into an document but now i need to filter out some data during the load, basically want all data from one table that is not in the other table. With sql I could do something like this:
SELECT AccountId, Email,Id
FROM Contact
where Id not in
(SELECT ContactId
FROM CampaignMember)
But now I have these two qvd files contact.qvd and campaignmember.qvd. So into the document I want to load all the data from contact that does have its ContactId in campaignmember.qvd .
Could anyone help me with this ?
Regards
Birkir
Use the 'exists' function. So first load the contacts from campaign members.
Then load the contacts where Id does not exist in the ContactId field from the pre-loaded campaign member table.
load
ContactId
from <Campaignmember source> ;
Load
AccountId,
Email,
Id
from <Contactsource>
where not exists(ContactId,Id) ;
look to "where not exists" in the QV help
Use the 'exists' function. So first load the contacts from campaign members.
Then load the contacts where Id does not exist in the ContactId field from the pre-loaded campaign member table.
load
ContactId
from <Campaignmember source> ;
Load
AccountId,
Email,
Id
from <Contactsource>
where not exists(ContactId,Id) ;
Hi,
Jonathan thank you so much for your help. This worked exactly as planned.
Regards
Birkir
Great to hear