Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Data Manipulation - Debit/Credit Logic

kkkim
8 - Asteroid

Hi, Alteryx experts!

 

I am trying to find a way to manipulate the data to output credit/debit results.

 

So data will look something like this:

 

Client NameSale DateItem BoughtAmount BoughtItem SoldAmount Sold
John Smith1-JanSocks400Hats-100
John Smith1-JanHats100Socks-450
John Smith1-JanShirt20Shoes-10
John Smith1-JanShoes50Shirt-20

 

I would need to output something like this:

 

Client NameSale DateSocksHats
John Smith1-Jan400100
John Smith1-Jan-450-100
  -500
    
Client NameSale DateShirtShoes
John Smith1-Jan2050
John Smith1-Jan-20-10
  040

 

Any thoughts on how to accomplish this? Would I use Transpose/Cross Tab?

 

Thank you so much for your help in advance!

3 REPLIES 3
IraWatt
17 - Castor
17 - Castor

Hey @kkkim,

There is probably a more refined way of doing this but here is one way:

IraWatt_0-1663275622637.png

I use the multirow formula tool to link related rows then the cross tab tool to pivot the data into the correct orientation. Then I summarize the rows to get the totals and union it all together. I also use the multi field tool to get the headers from the second table.

 

This solution uses the transpose and cross tab tools which can be hard to understand to new users. I would recommend checking out the community Getting-Started-Learning-Path for some context on how they work: https://community.alteryx.com/t5/Learning-Paths/Getting-Started-Learning-Path/ta-p/475117#done

 

 Any questions or issues please ask

Ira Watt
Technical Consultant
Watt@Bulien.com 

grazitti_sapna
17 - Castor

@kkkim , here is another way of doing this. Please let me know if you liked my solution. I simply used the field info tool to get fields to data rows.

 

Thanks!!

Sapna Gupta
kkkim
8 - Asteroid

Thank you so much for your help, everyone!

Labels
Top Solution Authors