Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
ForgotMyOldUsername
Contributor III
Contributor III

join a table on subfields? Column 'ID_SINGLE' > Column > 'ID_MULTI'

 

I have two tables , one with a field with a single 'UID', and a second with multiple of  of these UID's in a comma delimited string.

 

In SQL, it'd be fairly trivial to do,  you could just have a UDF to split the field and return as a table, but I can't see an obvious way to do it in QLIK.

So join this : 

Big_Table  
XYUID_MULTI
10A,B,C,D,E
2.2214887680.496082032B,C,D,E,F
2.2214887680.496082032A,B,C,D,E,F
2.2214887680.496082032B,C,D
2.2214887680.496082032A,B,C,D
2.2214887680.496082032D,E,F
2.2214887680.496082032C,D

 

and 

 

Small_Table 
UIDRANK
A1
B2
C3
D4
E5
F6

 

 

1 Solution

Accepted Solutions
Lauri
Specialist
Specialist

If you load the table with the SubField function like this, you'll get one row for every value of UID_MULTI:

Big:

Load X, Y, SubField(UID_MULTI, ',') as UID

From ...;

 

View solution in original post

3 Replies
Lauri
Specialist
Specialist

If you load the table with the SubField function like this, you'll get one row for every value of UID_MULTI:

Big:

Load X, Y, SubField(UID_MULTI, ',') as UID

From ...;

 

GaryGiles
Specialist
Specialist

You can use the subfield() function:

UID_Link_Table:

Load UID_MULTI,

          subfield(UID_MULTI,',') as UID

Resident Big_Table;

ForgotMyOldUsername
Contributor III
Contributor III
Author

Thanks, @Anonymous  & @Lauri ,

An amazingly elegant solution; in my head I'd expected something far more convoluted!

Thanks for taking the time to reply!