Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Compare two sets of data and subtract one from the other

steeldad
5 - Atom

Hey folks - first question on the forum.  I have two sets of summary data with almost the same headings and rows for example;

 

Set 1

NameAirHotel
Joe200100
Mary250100

 

Set 2

NameAirHotelGround
Joe400250100
Jane400100 
Mary50025050

 

I want to compare or join the data then subtract the data from Set 2 from the data in Set 1 to get a net result for Set 3:

 

Set 3 (Set 2 less Set 1)

NameAirHotelGround
Joe200150100
Jane400100 
Mary25015050

 

Thanks for your help!

3 REPLIES 3
andyuttley
11 - Bolide
11 - Bolide

Hi @steeldad 

 

There are two methods to do this, both attached here (and picture below). Both involve joining the data sets. The first is quicker/simpler, but isn't dynamic to how data might change in future (e.g. new columns being added); my preference would be method two (the second container) which transposes the data first, so we can join on the name (e.g. Joe) and field name (e.g. Air) and then just compare numbers side by side dynamically. 

joins.PNG

 

 

Hope this helps! 

 

Andy

steeldad
5 - Atom

Thanks Andy!

Savannah
8 - Asteroid

Hi Andy!

 

Would you please explain how the 'Name2' suddenly appears in Method 2, between the transpose tool and the select tool?

Edit: Never mind, I figured it out! :)

Many thanks! 

Labels