Apologies if this is a little convoluted, I am optimistic that there is a simpler way I just don't know what it is, hence the request for help...
I have created a workflow and related batch macro to firstly identify the first occurrence of a duplicate in a data set and then remove both the related rows (pair). I then re-query the same (now updated) data set for the possible first occurrence of a duplicate (looking for the next pair), and so on until all the pairs have been removed. I am doing it this way as one of the pair is a negative amount whereas the other is a positive amount and so they cancel each other out and some can be removed. It is possible for more than one positive match for each negative but obviously I can't remove all matches because that would not sum to zero so have to remove in pairs and then re-query.
In order to achieve the above, I have found myself (relatively new to Alteryx) having to write/append the pairs found to a external file, which I then read on the next iteration for items to ignore, so gradually as I pass through each iteration the items to ignore gets longer until no more matches are found. This iterative process may be inevitable, maybe not, but the thing that troubles more most of all is that writing/appending to a temp file is very slow and I am almost sure that there is a better, faster way to do this, hence the call for help comments.
Remove Contra Entries
Batch Macro