Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Douwe_KB
Contributor II
Contributor II

How to combine two fields to get a cartesian product?

Hi,

 

I have two fields: CProductgroep and ABAC06. ABAC06 stores a 3 letter code which represents the category of a business, for example CAT. CProductgroep represents a code which represents a product's group. I have the following load: 

Perc:
LOAD
    ABAC06,
    CProductgroep,
    [CProductgroep] & [ABAC06] As Kopp
   
Resident Omzetdata;

 I want to combine the values of CProductgroep and ABAC06 to a combination which represents the possible productgroups and business categories (Klantgroep). For example you could have CAT010, 

CAT030,

CAT050.....

BRB010,

BRB030,

BRB050...

Etc.

 

The above code does not give me a combination, but instead only gives me the following: 

Douwe_KB_0-1681741502990.png

 

I want to use this combination later on to do an applymap, where the combination of these two fields is the key.

Any tips are welcome!

Labels (4)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master II
Partner - Master II

Noconcatenate
Tmp:
LOAD CProductgroep Resident Omzetdata;

Left Join

LOAD ABAC06 Resident Omzetdata;

Noconcatenate
"Cartesian product":
LOAD CProductgroep & ABAC06 as Kopp

Resident Tmp;

DROP Table Tmp;

View solution in original post

3 Replies
Or
MVP
MVP

Load Field1 from Sometable;

Join

Load Field2 from Sometable;

Douwe_KB
Contributor II
Contributor II
Author

Can you elaborate?

BrunPierre
Partner - Master II
Partner - Master II

Noconcatenate
Tmp:
LOAD CProductgroep Resident Omzetdata;

Left Join

LOAD ABAC06 Resident Omzetdata;

Noconcatenate
"Cartesian product":
LOAD CProductgroep & ABAC06 as Kopp

Resident Tmp;

DROP Table Tmp;