Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

junahn90
New Contributor

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

Tags (1)
5 Replies
MVP
MVP

Re: Combining Dimensions into one

Try like this

DataTable:

LOAD Name,

     SubField(ID, '|') as ID;

Load Name,

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

From DataSource

martinpohl
Valued Contributor II

Re: Combining Dimensions into one

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
New Contributor

Re: Combining Dimensions into one

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
New Contributor

Re: Combining Dimensions into one

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

martinpohl
Valued Contributor II

Re: Combining Dimensions into one

Maybe crosstable load is an Option.

Regards

Community Browser