Free Trial

Alteryx Designer Desktop Discussions

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

Tough one- needing help finding possible combinations

Dittau
8 - Asteroid

Hello,

 

If i want to see all possible combinations (2 columns from an excel sheet) that equal a certain value is there a way to produce that in an output? 

 

ex: i want to see all combinations that equal 10



data

 

column 1 values                 Column 2 values

1                                                  -3 

5                                                    -1

10                                                17

15                                                11

30                                                 5

14                                                -5

 

result

 

1. 10

2. 15, -5

3. 11, -1

4. 5 & 5

5. 14, -3, -1

1 REPLY 1
jonwyp
6 - Meteoroid

Hi, you can try using a combination of append and summarize tool to make this work. Appending column 2 to column 1 creates a list of all number combinations between both columns. You can then use a formula tool to sum and concatenate both columns. Pass that through a summarize tool (Group by: Sum and Concat: string of both values) and use a text to column tool to split it out into rows. Sample workflow below:

 

jonwyp_0-1682388268631.png

Output:

jonwyp_1-1682388298728.png

Note: This only takes into account 1 unique value from each column though. If you want to use more than 1 value per row, the solution would be more complex.

Labels
Top Solution Authors