community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

How to find difference between two tables (or two sets of data)

Highlighted

Hello everyone,

 

I have two sets of data, for example (each number represents a particular order that was placed)

 

TypeM09M10M11M12
A0120
B1000
C1220
D0100

 

TypeM09M10M11M12
A0120
B0010
C1002
D0011

 

I would like to compare the two data sets to find differences. These differences can be classified as

a) New order

b) cancelled order

c) postponed order

 

Analysis

Type A = comparing the two sets, it can be seen there are no changes so a perfect match

Type B = order in M09 (first dataset) has been moved to M11 (second dataset)

Type C = order in M09 is the same in both sets. Order in M10 (first dataset) has moved to M12 (second dataset). Order in M11 (first dataset) has been cancelled (because the number 2 only occurs once in the second dataset, and this number has already been called earlier and picked up, so it cannot be called again, hence it is considered as cancelled)

Type D = order in M10 (first dataset) has been postponed to M11 (second dataset). Order in M12 in second dataset is a new order as it cannot be found in the first dataset

 

As an output I would like something along the lines of :

TypeWhat happenedPreviousNew
BpostponedM09M11
CpostponedM10M12
CcancelledM11-
DpostponedM10M11
Dnew-M12

 

I am thinking that the problem is very complex and may require some detailed analysis. Any help would be very much appreciated. Thanks

Alteryx Certified Partner
Alteryx Certified Partner

@blytonpereira,

 

Please try using this macro of mine:  https://gallery.alteryx.com/#!app/CReW-Delta--Alpha-/5b41141b826fd3116445fee8

 

It should help you get you to where you want to go.

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Labels