Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
abe786
Contributor III
Contributor III

How to find common values between 2 strings in UI

I have 2 strings which contain multiple numeric values like 

String 1: 123, 456, 789

String 2: 234, 567, 456, 231, 123


Is there anyway I can return the common values between 2 strings i.e. 123 and 456 ?

4 Replies
Anil_Babu_Samineni

If you have four rows like?

String 1: 123, 456, 789

String 2: 234, 567, 456, 231, 123

String 3: 1234, 4567, 789

String 4: 2345, 567, 4567, 231, 123

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
tresesco
MVP
MVP

Doing it in UI using qlik function would not be very dynamic. Script solution would the best way to go. Otherwise create your own function as macro and then use; again using macro function has it's limitations.
abe786
Contributor III
Contributor III
Author

Actually these string are dynamically generated based on user selections. I need the intersection to be computed and stored in a variable. I was thinking of doing same with an variable starting with = If I go the macro way, probably I would need an action to invoke the macro on each user selection ? 

tresesco
MVP
MVP

Macro function would not need an action. However, using user-defined macro function in the server
and client environment might not be very smooth. Could you please create a sample app and explain the expected output there with business scenario?