Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Matching amounts for SUM 0

stefaniadurdan
8 - Asteroid

Hello,

 

I have a complex scenario, in my opinion, where I need to highlight differently amounts which could be matched against each other to have their sum 0, but there can be multiple combinations. I tried to capture all of them in the examples below. The amounts are grouped by Cost type (Cost 1,2, etc), therefore amount of -100 from Cost 1 with amount of 100 from Cost 2 will not be a match. 

Examples of match (from same cost):

-123 with 123

500 with the following amounts: -250 and -250

-1000 with the following amounts: 900 and 100

 

They might not be necessarily one row after the other one, therefore Multi-row formula could not be used (in my opinion).

 

I have highlighted in colors the output just to be easier for you to follow my logic, how they have been matched. In the final output, I just need the "Matching pair" column to confirm whether a match has been found or not.

 

I am also not sure if this is possible to be done in Alteryx, I am trying to figure out a way and would highly appreciate your suggestions. Also partial solution is accepted (some rows still to be manually checked and confirm either they are a match or not.

 

stefaniadurdan_0-1663599454490.png

 

7 REPLIES 7
Emmanuel_G
13 - Pulsar

Hi @stefaniadurdan ,

 

Find attached the way of doing this.

 

Let me know if there is any issue and do not hesitate to mark this answer as solution if it helped.

 

Emmanuel_G_0-1663602894009.png

 

joshikalyani
8 - Asteroid

I also have similar question, i want to check if the amount is matching and resulting in zero

joshikalyani_0-1663606489581.png

If countif is 2 then i wanted to check how can i perrom sum for the 123 account

Emmanuel_G
13 - Pulsar

@joshikalyani Can you please share an excel file with input and desired output ?

joshikalyani
8 - Asteroid

@Emmanuel_G 

Added the excel, if account is matching and the amounts are rounding to 0, then i need such record

joshikalyani
8 - Asteroid

Attached file

Emmanuel_G
13 - Pulsar

@joshikalyani  Sorry but with this sample of data I can't quite understand what the problem is. Can you please provide some more data in excel?

joshikalyani
8 - Asteroid

If the amount of same account is matchoff to zero then need such record. Highlighted in yellow in sheet

Labels
Top Solution Authors