Hi,
Is it possible to group a list of numbers by specific given value?
For each account (AAA), there will be 2 or more numbers as grouping reference (600,900), the alteryx tool need to decide from input 1 that how should (100,200,300,400,500) be grouped to 600 and 900.
For example, give 600 and 900, 100,200,300,400,500 would be grouped to
100+200+300 =600
400+500 =900
Detailed data, number, output as attached:
Input1: Data to be grouped
| Account | Value Date | Amount |
| AAA | 12/1/2023 | 100 |
| AAA | 12/1/2023 | 200 |
| AAA | 12/1/2023 | 300 |
| AAA | 12/1/2023 | 400 |
| AAA | 12/1/2023 | 500 |
| BBB | 12/2/2023 | 100 |
| BBB | 12/2/2023 | 200 |
| BBB | 12/2/2023 | 300 |
| BBB | 12/2/2023 | 400 |
| BBB | 12/2/2023 | 500 |
| BBB | 12/2/2023 | 250 |
| BBB | 12/2/2023 | 210 |
| BBB | 12/2/2023 | 110 |
| BBB | 12/2/2023 | 190 |
Input2: grouping reference
| Account | Value Date | Goal |
| AAA | 12/1/2023 | 600 |
| AAA | 12/1/2023 | 900 |
| BBB | 12/2/2023 | 1750 |
| BBB | 12/2/2023 | 510 |
Output:
| Account | Value Date | Amount | Goal |
| AAA | 12/1/2023 | 100 | 600 |
| AAA | 12/1/2023 | 200 | 600 |
| AAA | 12/1/2023 | 300 | 600 |
| AAA | 12/1/2023 | 400 | 900 |
| AAA | 12/1/2023 | 500 | 900 |
| BBB | 12/2/2023 | 100 | 1750 |
| BBB | 12/2/2023 | 200 | 1750 |
| BBB | 12/2/2023 | 300 | 1750 |
| BBB | 12/2/2023 | 400 | 1750 |
| BBB | 12/2/2023 | 500 | 1750 |
| BBB | 12/2/2023 | 250 | 1750 |
| BBB | 12/2/2023 | 210 | 510 |
| BBB | 12/2/2023 | 110 | 510 |
| BBB | 12/2/2023 | 190 | 510 |