Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlikuser225
Contributor III
Contributor III

Qlik match function

Hello All,

 

Can anyone please help me to with below issue?

 

I have a table like this

ID, Region, Products

1 ,NA,  Apple ; Mango ; Peach ; Pear

2, SA , Apple

3, APAC , Mango ; Apple

4 , APAC , Pear

 

 How can i  create a tables  like this from above table

Table 1:

ID, Region, Products

1 ,NA,  Apple 

Table2:

ID, Region, Products

1 ,NA,  Mango

Table3:

ID, Region, Products

1 ,NA,  Peach

Table3.1:

ID, Region, Products

1 ,NA,  Pear

Table4:

ID, Region, Products

2, SA , Apple

Table5:

ID, Region, Products

3, APAC , Mango 

 

Table5:

ID, Region, Products

4, APAC , Pear 

 

Thanks in Advance

Labels (3)
1 Solution

Accepted Solutions
cristianj23a
Partner - Creator III
Partner - Creator III

Hi, try this code:

 

// Creation of the inline table with the original data
Data:
LOAD * INLINE [
ID, Region, Products
1, NA, Apple ; Mango ; Peach ; Pear
2, SA, Apple
3, APAC, Mango ; Apple
4, APAC, Pear
];

// Load the disaggregated data
DesaggregatedData:
LOAD
ID,
Region,
Trim(SubField(Products, ';')) AS Product
RESIDENT Data;

// Delete the temporary table "Data"
DROP TABLE Data;

cristianj23a_0-1691099973508.png

 

 

Regarts.

 

https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.

View solution in original post

1 Reply
cristianj23a
Partner - Creator III
Partner - Creator III

Hi, try this code:

 

// Creation of the inline table with the original data
Data:
LOAD * INLINE [
ID, Region, Products
1, NA, Apple ; Mango ; Peach ; Pear
2, SA, Apple
3, APAC, Mango ; Apple
4, APAC, Pear
];

// Load the disaggregated data
DesaggregatedData:
LOAD
ID,
Region,
Trim(SubField(Products, ';')) AS Product
RESIDENT Data;

// Delete the temporary table "Data"
DROP TABLE Data;

cristianj23a_0-1691099973508.png

 

 

Regarts.

 

https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.