Alteryx Designer Desktop Discussions

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

Deleting reversing entries

Alessia11900
5 - Atom

Dear Alteryx community,

 

i would like to ask for your kind assistance/expertise in creating the following workflow

I am working on a large data set that includes reversing entries I would like to delete.

 

For example, there will be a transaction with a value of 500, then a couple data rows later (or in the row directly after) there will be a value of -500. I would like to delete all of these reversing entries.

 

However, sometimes there will be a value of 500, then a value of -500 and then a value of 500 again. Meaning I would only like to delete the first 500 and subsequent -500 but keep the final value of 500.

 

This occurs multiple times with lots of different values, sometimes with an amount that is reversed out multiple times.

 

I have attached an example of the excel formula I have previously used to identify all reversing entries.

Assuming the transactional amounts are in column A and starts in A2, I use the following formula:

In B2: =IF(A2="","",IF(A2<0,-A2&"_"&COUNTIF(A$2:A2,A2),A2&"_"&COUNTIF(A$2:A2,A2)))

In C2: =IF(COUNTIF(B:B,B2)=2,"x",""

I then filter by x and delete all these rows as these are the reversing entries

(I have attached an example of this)

 

I am not sure if there is a way I could do this on Alteryx (please keep in mind I am new to the software).

 

Many thanks!

2 REPLIES 2
TimN
13 - Pulsar

Maybe something like this...

Alessia11900
5 - Atom

That's perfect thank you so much!

Labels
Top Solution Authors