Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
karan_kn
Creator II
Creator II

Get only common value in the field

Can someone help me to pick common value and create new field in load statement

EX:

account1=account2

Account1Acount 2NewField
111
233
35
47
6 Replies
sunny_talwar

How did you get 3 for row number 2 under NewField? In row 2 Account1 <> Account2

karan_kn
Creator II
Creator II
Author

compare two fields and get common values only

Ex: 1 and 3 values only common

karan_kn
Creator II
Creator II
Author

looking like this:

if(Account1=Account2) as new field

max_potass
Creator
Creator

If(Account1 = Account2, Account1) as NewField

shaileshs
Contributor
Contributor

Here is a concept that might get desired results but i wouldnt recommend this on huge data set. You would have to evaluate if this fits your needs, i have separated columns and loaded them in two different tables , and looked up values, Its a simple script so hopefully not much of explanation needed here

Here is info on lookup function:

https://help.qlik.com/en-US/sense/September2017/Subsystems/Hub/Content/Scripting/InterRecordFunction...

Accounts:


Load * Inline [


Account1


1


2


3


4


] (delimiter is '|');



Accounts2:


Load *, Lookup('Account1', 'Account1', Account2 , 'Accounts') as NewField


Inline [


Account2


1


3


5


7


] (delimiter is '|');


Let me know what you think.

shaileshs
Contributor
Contributor

Hi Karen,

Does this answer your question?

Thanks,