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

Alteryx Designer Desktop Discussions

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

Need to convert my input file into a specific format

swarajjoshi
7 - Meteor

Hello Everyone,

 

I have a input file which looks like this,

swarajjoshi_0-1633523452770.png

 

 

And I want to convert each row into a specific format, the example for the output format is like this,

swarajjoshi_1-1633523494671.png

 

Note:- This is just an example where I have manually converted 1st row of the input file to get the result

 

What I want is to create a block like above for all the 16 entries present in the input file so in the output file there should be 16 blocks one below the other. I have tried various methods but I'm not able to get the desired output.

 

And thus I'm back posting in this awesome community where I have found answers to many of my problems.
Any help would be highly appreciated.

 

I'm attaching the input and desired output file for convenience.

 

11 REPLIES 11
pdave87
11 - Bolide

@swarajjoshi Hi, did you tried transposing data?

 

pdave87_0-1633524040580.png

 

swarajjoshi
7 - Meteor

Hello @pdave87 ,

 

Thanks for your response.

But I have tried transposing it and that works fine for the first part of the output block but if you see there is a row below the first 5 lines in my output file which contain the Item Code, Lot details, Lot locations & Qty(EA) and that I see is missing from the solution you have shared.

So you can try and add that part too

pdave87
11 - Bolide

here we go, Alteryx has all the tricks to provide desired output (magic) 🙂 Workflow attached for your test run!

 

pdave87_0-1633524556776.png

 

swarajjoshi
7 - Meteor

Hey @pdave87 ,

 

You're pretty quick human and almost there as you see the solution provided by you is almost what I wanted but the latest row you added doesn't contain the required headers, here's is what I want the latest added rows to look like

swarajjoshi_0-1633525129123.png

You have got the data, just the headers are missing

pdave87
11 - Bolide

@swarajjoshi Here we go again! happy solving!! 🙂 Tested Workflow attached for reference.

 

pdave87_0-1633526232145.png

 

pdave87
11 - Bolide

@swarajjoshi For better representation, refer attached workflow. It includes null rows for each stack of data 🙂

 

pdave87_0-1633530752115.png

 

ChrisTX
16 - Nebula
16 - Nebula

The attached workflow seems to give the output format you're looking for.

 

The key is to use the Union tool to manually align the columns.

 

ChrisTX_0-1633531030258.png

 

 

Chris

swarajjoshi
7 - Meteor

@pdave87 @ChrisTX 

Thanks so much for putting in the efforts but there is a slight change in the kind of output that I need,

now for example if the Market from & Market To are same the lots should be place one below the other and no different bloc should be made.

For e.g. If Market from if 'Switzerland' and Market To is 'United Kingdom' the output should look like,

swarajjoshi_0-1633534750466.png

I'm attaching the output file for reference.

 

And sorry for the last minute changes as I know you guys had spent your time for providing me the output.

 

pdave87
11 - Bolide

@swarajjoshi *****Abracadabra****** Your wish is granted 🙂 Happy Solving!!

 

pdave87_1-1633585468957.png

 

 

Labels