We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Create nCr with a single field

aguzmanf
5 - Atom

I have a list of 20 unique numbers and I want to create an output of nCr rows
i.e. 20C5 = 15504 rows

Each row should have a unique combination of 5 of the numbers 

i.e.  in the table below row#2 is a duplicate from row#XX because they contain the same elements

ROW #ID1ID2ID3ID4IDr

1

12345
212346
..................
XX21346

 

I have tried with several macros and I can get to remove the duplicate pairs for the 1st iteration where there are only 2 fields but I still dont know how to remove duplication where there are more than 2 fields to search 

1 REPLY 1
Qiu
21 - Polaris
21 - Polaris

@aguzmanf 
I feel there should be a smarter way. but the result is correct.
I have also tested for 19C5 and get the correct answer 11628.

0317-aguzmanf.PNG

Labels
Top Solution Authors