Alteryx Designer Desktop Discussions

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

Dynamic Sum/Match

TFish
6 - Meteoroid

Hi everyone,

Do we have a way to dynamically Sum/Match entries in Alteryx? I have a lot of records that require me to check if they are match or Outs.

 

The records come from 2 different systems, X and Y. They are identified by ID (2 records can share the same ID), then at a higher level is Security Code which contains some IDs, and then Unit which contains some Security codes. Then we have the Amount for each entry.

 

Example:

Source

UnitSecurity codeIDAmount
X123455AAA45323211100
X123455AAA45323224200
Y123455AAA45323213-50
Y123455AAA45323213-50
Y123455AAA45323226-200



Now, we match based on Source, Unit, Security code, and Amount. The example above is a match. The way I did it is using Summarize tool to transpose the data so group everything up by Source, Unit, Sec code, and Sum by Amount, and then we compare X Source column with the Y source column to see if the Sum of Amounts =0 to create matches:

Source

UnitSecurity codeAmountBreak Check:
X123455AAA300Match
Y123455AAA-300Match

 

Result (we use Join to return the Break Check of Match back to all entries with the same Source, Unit, and Sec Code):

Source

UnitSecurity codeIDAmountBreak Check
X123455AAA45323211100Match
X123455AAA45323224200

Match

Y123455AAA45323213-50Match
Y123455AAA45323213-50Match
Y123455AAA45323226-200Match

 

However, if I have 1 extra entry that is invalid, the whole summarize tool will be wrong and all records will be Out instead of only the 1 extra record being Out:

 

Source

UnitSecurity codeIDAmount
X123455AAA45323211100
X123455AAA45323224200
Y123455AAA45323213-50
Y123455AAA45323213-50
Y123455AAA45323226-200
Y123455AAA45323226-250

 

Summarize:

Source

UnitSecurity codeAmountBreak Check:
X123455AAA300Out
Y123455AAA-550Out


How do we match the entries that can be matched off with another Source only, and leave the -250 Y Source entry to be the only Out instead of all 6 records?

 

0 REPLIES 0
Labels