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

Generate nCr combinations using Scripting

Hi All,

I have been working on Qlik since past 3 years and always wanted to use this awesome product to automate stuff. this time i am thinking to use it to create nCr combinations of all the possible dimensions. for .eg. 

if i have a dataset of 4 dims(A,B,C,D) and 2 measures(E,F), can we create multiple datasets like:

1 DIM

1. A,SUM(E),SUM(F)

2. B,SUM(E),SUM(F)

3. C,SUM(E),SUM(F)

4. D,SUM(E),SUM(F)

 

2 DIM

1. A,B,SUM(E),SUM(F)

2. A,C,SUM(E),SUM(F)

3. A,D,SUM(E),SUM(F)

4. B,C,SUM(E),SUM(F)

5. B,D,SUM(E),SUM(F)

6. C,D,SUM(E),SUM(F)

 

3 DIM

....

 

4 DIM

....

 

and all the above should be automated in the sense that all i have to do is mention the name of the columns.

Thank you in advance.

@jagan @Miguel_Angel_Baeyens @rwunderlich @MichaelTerenzi 

0 Replies