Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

How to delete first 50 columns for input files with different data format?

skotian1289
8 - Asteroid

Hello All,

 

I am a new user and this is my first time post.

 

I am trying to build a workflow where i need to delete the first 50 columns of my Input file. My input files will differ everyday and column headers wont be the same or will not be in same alignment  hence the select/deselect field tools is not helping me when i tried because the workflow tried to locate the field name in my next input file.

 

See below example of what I am trying to say:

Lets say we are trying to build a workflow to delete first 5 columns of input file doesn't matter what the headers are just delete first 5 columns.

 

Input File 1: 

Column 1Column 2Column 3Column 4Column 5Column 6Column 7Column 8Column 9Column 10Column 11Column 12Column 13Column 14
123466778899445555667733

 

Output for File 1:

Column 6Column 7Column 8Column 9Column 10Column 11Column 12Column 13Column 14
778899445555667733

 

 

Input File 2:

Column 7Column 8Column 9Column 10Column 11Column 12Column 13Column 14Column 1Column 2Column 3Column 4Column 5Column 6
8899445555667733123466

77

 

 

 

Output for file 2:

 

Column 12Column 13Column 14Column 1Column 2Column 3Column 4Column 5Column 6
66773312346677

 

Please assist .

 

Regards

SK

7 REPLIES 7
JosephSerpis
17 - Castor
17 - Castor

Hi @skotian1289 I mocked up a workflow let me know what you think?

bhrmitra
10 - Fireball

Hi 

 

Welcome to the community.

 

There are a multiple ways to achieve this. I have used a dynamic input in my solution. I hope this is what you wanted. I had posted a solution before also but it did not take into account multiple rows and hence edited it again.

 

Untitled picture.png

 

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

 

Thanks,

Abhra Mitra

skotian1289
8 - Asteroid

Hi Joseph,

 

Thanks for your response.

 

I tried ur workflow but somehow all the deleted columns are appearing in the end and there are no values captured. Not sure if i am following the steps correctly. 

 

Actually my data is very huge with 500 columns and thousands of values plus it is a Csv format. I cant share the actual data but i can give you a sample file attached. 

 

Apologies for not providing sample file at beginiing. 

 

Regards

SK 

JosephSerpis
17 - Castor
17 - Castor

Hi @skotian1289 I used your file to show how the workflow works and attached an Alteryx package so you can see how it works

skotian1289
8 - Asteroid

@Joseph - Genius, i tried the workflow steps and it is working now. Thanks a ton

MikeA
Alteryx
Alteryx

Hello,

 

An alternative solution would be to use the Dynamic Select tool using a "NOT IN" function and utilizing the available [FieldNumber] option in that tool:

 

Screen Shot 2020-06-05 at 7.47.40 AM.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Attached is an example that also has a small process to generate the numeric portion of the function so that you don't have to type out number's 1 - 50, but rather just copy and paste.

FerdinandFuchs
5 - Atom

Hey,

 

I guess the shortest solution is to use the Dynamic Select Tool, switch it to "Select via Formula" and use the expression [FieldNumber] > 50.

 

Ferdinand 

Labels