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: 
junahn90
Contributor II
Contributor II

Combining Dimensions into one

What I did:

DataTable:

Load

     Name,

     ID1 &

     ID2 &

     ID3 as ID

From DataSource

I have also tried inputting separator in-between (ID1&'|'&ID2)

IF ID1~3 are in format: 12-123456

then the first method gave me

    

NameID
John Doe12-12345612-12345612-123456

whereas the second method gave me

NameID
John Doe12-123456|12-123456|12-123456

However, I want the table to do this:

NameID
John Doe12-123456
John Doe12-123456
John Doe12-123456

Thanks

5 Replies
sunny_talwar

Try like this

DataTable:

LOAD Name,

     SubField(ID, '|') as ID;

Load Name,

     ID1 & '|' & ID2 & '|' & ID3 as ID

From DataSource

martinpohl
Partner - Master
Partner - Master

You can load this by

load

Name,

ID1 as ID

from YourSource;

load

Name,

ID2 as ID

from YourSource;

load

Name,

ID3 as ID

from YourSource;

In a table you will so only one line because Qlik shows distinct values in tables, but your data model contails 3 times lines of your source.

Regards

junahn90
Contributor II
Contributor II
Author

I wanted to avoid this route because I didn't want to load tables multiple times (especially if I have more ID#). Thanks for the suggestions.

junahn90
Contributor II
Contributor II
Author

Thank you. I did not think of using the subfield.

martinpohl
Partner - Master
Partner - Master

Maybe crosstable load is an Option.

Regards