Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Horizontal P&L into database

tryingtosolve
5 - Atom

Hi all:  I have a P&L file with data laid out across and I want to turn it into a database.  One of the things that is throwing me off is that there are rows across the top with jurisdiction data that also need to be in the database...

 

database should look like:

 

asia  1  ABC AU sales  100

asia  1  ABC AU cogs   50

 

 

Thoughts on how to best accomplish this?  I tried playing with cross tab/transpose but getting stuck.

 

Thank you.

7 REPLIES 7
jdunkerley79
ACE Emeritus
ACE Emeritus

I would suggest:

jdunkerley79_0-1601719253110.png

 

Makes sure the Input has first row contains data selected.

Split the input into header and data using 2 sample tools

For the header rows add a RecordID and then you can transpose and cross tab to give the header for each column

For the data, transpose it then join to the header

This should allow the shape you need

 

Sample attached

 

Hopefully enough to get you going

atcodedog05
22 - Nova
22 - Nova

Hi @tryingtosolve ,

 

Here is a workflow for the task.

 

Input : File given by you.

 

Output : 

atcodedog05_0-1601719448887.png

Workflow : 

atcodedog05_1-1601719470524.png

 

Hope this helps : )

 

If this post helps you please mark it as solution. And give a like if you dont mind😀👍

huynv
6 - Meteoroid

I attached a workflow,

Hope it help

huynv96
9 - Comet

You can see my workflow attached

vstefano
7 - Meteor

Hi please find attached solution from Italy...

tryingtosolve
5 - Atom

This solution worked well!   Thanks so much all!

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @tryingtosolve 

 

Cheers and happy analyzing 😀

Labels
Top Solution Authors