Hi.
I have several data sets where I would like to build a workflow that identifies amounts that SUM to zero and segregate them from amounts that do not SUM to zero. Prior to Alteryx I would use Excel's solver functionality to accomplish such tasks. Is there a way to replicate this functionality in Alteryx? I attempted to use the Optimization tool, but am not familiar enough with the syntax to build out the parameters correctly. Can anyone assist?
Example data:
694,494.34 | 1 |
(77,749.62) | 1 |
207,256.03 | 1 |
(1,517,382.72) | 1 |
615,632.35 | 1 |
77,749.62 | 1 |
100,000.00 | 0 |
Solved! Go to Solution.
Hi @jannis2021 ,
After removing the brackets from the negative values, adding a minus sign at the front and converting that field to a numeric data type, you can make use of a Running total tool to see when the amounts add up to zero and flag it with a multi-row formula tool
Best,
Angelos
I actually came up with the solution after posting this. Happy to post the workflow if anyone else is interested, thanks.
Hi @jannis2021
Yes please, This is an interesting usecase and I would love to see how you solved it 🙂
I'll need a bit to tweak my workflow to be sufficiently generic, but the basics are below:
- Feed in a listing of numbers you are researching with Alteryx generated record IDs that are fed into the Optimizer as variables.
- Their coefficients are 1 (integer) with LB of 0 and UB of 1. These are binary variables.
- The constraints are set up to be the actual value of the number itself. Configure the optimization tool to be a dense matrix with variables in rows.
- The objective to feed into input "B" is that the constraint field == 0.
- Toggle the Maximize objective to be true in the Optimizer tool.
This has been working effectively across multiple tests; keeping in mind that I am not tweaking the built in "Slack" in the tool so sometimes my numbers do not always exactly equal zero but this is acceptable in my use case.
Hi @jannis2021,
Can you post the workflow with the Optimization tool. Thank you.