Alteryx Designer Desktop Discussions

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

Is there a way to select second last row in the summarize tool

wonka1234
10 - Fireball

Is there a way to select second last row in the summarize tool

 

I can use the summarize to get last row.. but I want 2nd last.

3 REPLIES 3
michelle_mathews
Alteryx Alumni (Retired)

@wonka1234 , you could use the Sample tool to group on a column and grab the last 2 rows (last N rows), and then use another sample tool to grab the first 1 rows by that same column. There may be an easier way, but this would get you the second to last row for a particular group. 

Emmanuel_G
13 - Pulsar

Hi @wonka1234 ,

 

Find a test below with the 2nd last row only selected.

 

Let me know if it works for you.

 

Cheers ! 

Emmanuel_G_0-1657702486060.png

 

binuacs
20 - Arcturus

@wonka1234 Another way of doing this with the select records tool. Sample workflow attached for your reference

 

binuacs_0-1657663961481.png

 

Labels