Alteryx Designer Desktop Discussions

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

Input Header Starts on Different Lines

bleu
8 - Asteroid

I have a single report that Alteryx reads from.

It's downloaded daily and just gets overwriten in the folder that Altrerx reads.

Sometimes it comes in with the header starting on row 10.

Other times it comes in with the header starting on row 11.

 

How can I use a single input that will test where the header?

 

I can use an input tool se to read data starting at line 10 but when happens when the report generated starts at line 11 and pushes the header down a row?

 

Can't seem to find the solution in community.

 

Thanks in advance.

4 REPLIES 4
bleu
8 - Asteroid

Also, I should point out that this file is a csv.

echuong1
Alteryx Alumni (Retired)

If your header line is consistent, you should be able to use a keyword to help identify which line contains the headers after importing everything on the sheet. Once you identify that, you can create a flag to filter for the header and the subsequent data, and then use a dynamic rename to bump the headers up.

 

In the example attached, I have two sheets. The data is the same on both, but they start on different lines. I have two streams in the workflow to example, but the one will work for either sheet. 

 

I imported everything in the sheet by selecting that the first row contains data so it doesn't pick up any headers. From there, I used a multi-row formula to identify the line that has Customer_ID in the row (header) and anything after it. I used a filter to isolate the headers and a dynamic rename to move the headers to their proper place.

 

Hope this helps!

 

echuong1_0-1613499302070.png

 

bleu
8 - Asteroid

echuong1 This is exactly what I'm looking for.

Thank you!! 🙂

 

Bazal
6 - Meteoroid

Thanks a lot for the solution! This is incredibly helpful.

 

Now the challenge is how do I use this with dynamic input. E.g Single excel workbook with multiple sheets all with different header rows.

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels