Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
DimasDron
Contributor
Contributor

Opportunities "QlikView"

There are 5 columns of 10 variables.
Can the program:
1. Select all possible combinations
2. Find the most common matches

1 Solution

Accepted Solutions
Saravanan_Desingh

Are you looking something like this?

tab1:
LOAD * INLINE [
    Colum 1, Colum 2, Colum 3, Colum 4, Colum 5
    1, A, B2, QQ, 12
    2, B, F4, SS, 33
    3, C, F7, FF, 33
    4, D, K3, QQ, 22
    1, E, C9, QQ, 55
    2, F, F4, SS, 66
    3, A, F7, FF, 77
    8, B, K3, FF, 33
    9, C, F4, ZZ, 33
    3, A, F7, VV, 22
];

tab2:
LOAD [Colum 1] 
Resident tab1;
Join (tab2)
LOAD [Colum 2]
Resident tab1;
Join (tab2)
LOAD [Colum 3]
Resident tab1;
Join (tab2)
LOAD [Colum 4]
Resident tab1;
Join (tab2)
LOAD [Colum 5]
Resident tab1;

tab3:
LOAD *, [Colum 1]&[Colum 2]&[Colum 3]&[Colum 4]&[Colum 5] As Pattern
Resident tab2;

Left Join(tab3)
LOAD Pattern, Count(Pattern) As Cnt
Resident tab3
Group By Pattern;

Drop Table tab1, tab2;

View solution in original post

7 Replies
Saravanan_Desingh

Can you explain what do you mean by '5 columns of 10 variables'? Variables and Fields are different.

DimasDron
Contributor
Contributor
Author

An example in the attached file.
You need to make a list of all possible combinations and sort by number of matches

Saravanan_Desingh

The attachment throws error. Please check and upload again.

DimasDron
Contributor
Contributor
Author

duplicate file

Saravanan_Desingh

Are you looking something like this?

tab1:
LOAD * INLINE [
    Colum 1, Colum 2, Colum 3, Colum 4, Colum 5
    1, A, B2, QQ, 12
    2, B, F4, SS, 33
    3, C, F7, FF, 33
    4, D, K3, QQ, 22
    1, E, C9, QQ, 55
    2, F, F4, SS, 66
    3, A, F7, FF, 77
    8, B, K3, FF, 33
    9, C, F4, ZZ, 33
    3, A, F7, VV, 22
];

tab2:
LOAD [Colum 1] 
Resident tab1;
Join (tab2)
LOAD [Colum 2]
Resident tab1;
Join (tab2)
LOAD [Colum 3]
Resident tab1;
Join (tab2)
LOAD [Colum 4]
Resident tab1;
Join (tab2)
LOAD [Colum 5]
Resident tab1;

tab3:
LOAD *, [Colum 1]&[Colum 2]&[Colum 3]&[Colum 4]&[Colum 5] As Pattern
Resident tab2;

Left Join(tab3)
LOAD Pattern, Count(Pattern) As Cnt
Resident tab3
Group By Pattern;

Drop Table tab1, tab2;
Saravanan_Desingh

Check the Cnt here for the number of occurrencescommQV25.PNG.