Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

From Sales and VC rows to CM column

Antonello
5 - Atom

Hello Community,

 

I would have a pretty simple question but potentially beneficial for many users.

 

I have a transaction register where each row represents either a Sales External or Variable cost account for certain products.

 

Antonello_0-1599689332198.png

 

I want to aggregate data by Product and Region and have 2 columns: Sales External and Contribution Margin (calculated as Sales External + VC)

 

Antonello_1-1599689437415.png

 

I tried with Cross-tab tool but I'm definitely missing something....

 

Thanks for the support!

6 REPLIES 6
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @Antonello,

 

Could you provide some sample data and the output your looking to achieve? It might help us get to the solution a little quicker.

 

Kind regards,

Jonathan

AbhilashR
15 - Aurora
15 - Aurora

Hi @Antonello, attached is an attempt to compute your output.

AbhilashR_0-1599692045348.png

Let us know if this isn't what you are looking for.

 

Antonello
5 - Atom

Hi Jonathan,

 

Sure, sorry if I didn't upload the excel dataset earlier.

 

Thank you

Input and desired outcome.png

Antonello
5 - Atom

Hello AbhilashR,

 

thank you for your proposed solution. However when a record has only VC and not Sales the output is missing that product. 

 

For example, I used the attached DB where Product DD has only costs (75). After running the WF I correctly see all products except for Product DD.

 

Thank you

 

 input.pngOutcome.png

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @Antonello,

 

In order to get the output you're looking for you just need to scaffold the data from the initial input to ensure you keep all Product & Region scenarios:

 

Jonathan-Sherman_0-1599734295694.png

 

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Regards,

Jonathan

Antonello
5 - Atom

Thank you very much Jonathan!

 

I just changed the columns headers into Sales Ext and CM but apart from that it works perfectly.

 

Thanks also to @AbhilashR for the support.

Labels
Top Solution Authors