Start Free Trial

Alteryx Designer Desktop Discussions

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

Combinations from a single Column

agrawaluk
8 - Asteroid

Hi All,

 

I am trying to create combination from a single column. My input looks like this:

 

DC Name
DC01
DC02
DC03
DC04
DC05
DC06
DC07
DC08
DC09
DC10

 

My output would have 1023 combinations/rows (this excludes combinations that are repetitive for eg: DC01+DC02 is same as DC02+DC01). My output should look like:

DC Name
DC01
DC02
DC03
DC04
DC05
DC06
DC07
DC08
DC09
DC10
DC01 + DC02
DC01 + DC02 + DC03
...and so on

 

Please let me know if anything is unclear. 

 

4 REPLIES 4
afv2688
16 - Nebula
16 - Nebula

Hello @agrawaluk ,

 

I came up with an idea using binary counting:

 

Sin título.png

 

Regards

agrawaluk
8 - Asteroid

Thanks @afv2688 

 

The solution is really interesting. Another que - Is there a way to calculate the "1023" value rather than manually inputting it? Like if there were only 5 DCs the nCr value would have been different. 

 

afv2688
16 - Nebula
16 - Nebula

Hello @agrawaluk ,

 

It seems the example I shared with you was not fully dynamic.

 

I have already solved it and shold work perfectly now.

 

Regards

sgwong
8 - Asteroid

look for advice to get the output.

Labels
Top Solution Authors