Alteryx Designer Desktop Discussions

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

Two Columns Data Calculation

TheBIguy
7 - Meteor

Hello All,

I have a table which I have to combine with my master 

Table 1

abz
PQ2000
RS3000

 

Master Table

adefgh
P12345
Q12345
R12345
S12345

 

Expected output

azdefgh
P200012345
Q-200012345
R300012345
S-300012345

 

How to summarize this one?

 

 

So when P buys Q then P updates value with 2000 but Q loses -2000

 

Thanks in advance

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @TheBIguy 

 

Here is how you can do it. By transposing and joining

 

workflow:

atcodedog05_0-1628174227847.png

 

1. Using tranpose tool to convert columns to rows.

2. Using formula z is positive for column name a and z is negative for column name b.

3. Using find and replace to do vlookup of z column to main data.

 

Edit: I have added a join tool approach too.

 

Hope this helps : )

TheBIguy
7 - Meteor

Thanks Mate I have added Join myself but yeah very helpful of yours! 🙂

 

atcodedog05
22 - Nova
22 - Nova

Hence I provided both approaches😅. I pefer find and replace over join because it doesn't not cause one to many or many to many joins 😅

 

Happy to help : )

Cheers and have a nice day!

Labels