Alteryx Designer Desktop Discussions

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

Using "Sample" with interface tools to remove N-1 rows

Kaffo
5 - Atom

I have different input file formats where the table data all starts on different rows, ie row 8 or row 10. 

 

As such I want to use the sample tool to remove leading rows, using the interface tools, so the user can input row number for the headers. 

From this I want to subtract one row to remove all rows before it before using a dynamic rename to take headers from the first row of data. 

 

I can't use the dropdown and sample tool directly as there is no option to subtract from the user input.

5 REPLIES 5
Raj
16 - Nebula

@Kaffo 
Add some sample data and expected output will be in better place to help with flow.

Kaffo
5 - Atom

Apologies, now attached an example workflow. In the example the headers are in row 7 and therefore using the "numeric up down" the user will specify that headers are in row 7. 

 

The sample tool should use this and skip the first 6 rows ( 7 - 1).

 

Before the new top row is used for headers. Expected output here;

 

 

Thanks

Raj
16 - Nebula

@Kaffo 

find the workflow attached
mark done if solved.

Kaffo
5 - Atom

Thanks for your help Raj. I think it's 95% of my solution, whereby I need it to be an app, rather than a workflow. The input file will be a file browse also and the "Input A number" should also be in the interface window

Ignore me, I am able to use this approach for my workflow, by adding the record ID and using the filter for greater than or equal to, instead of sample I achieve the same result. Many thanks

apathetichell
19 - Altair

@Kaffo - change your action tool to update value with formula. use the formula

 

max([#1]-1,1)

 

you are doing this to make sure the number does not go below 1.

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