Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Filtering a single row and include the top and bottom 10 rows

Carlos_Tovar
7 - Meteor

Hello,

 

I am trying to filter on a single row and include the bottom and top rows next to it as a block.

 

For example this is an xml of a workflow and I want to filter criteria based on row 110 where it includes (BC) and make it include the bottom and top 10 rows next to row 110.

 

I will need to use a mutli row formula but need to keep the values exactly the same or it will mess the xml in the cell...is there a way to do that ? Then I can assign a tile tool of some sort if i need to. 

6 REPLIES 6
dsandmann
8 - Asteroid

To keep it simple - you could do the following:

 

  1. Use filter tool that filters on RecordID >= 110
  2. On the True anchor use a sample tool for bottom 11 records
  3. On the False anchor use a sample tool for top 10 records
  4. Union the two with the bottom 11 as input #1
MatthewO
Alteryx
Alteryx

@Carlos_Tovar attached is an example of how this can be accomplished. The current workflow only looks forward and backward by 2 rows out of convenience, but you could modify that logic in the Formula tool. I hope this is helpful!

 

image.png

Carlos_Tovar
7 - Meteor

This works for (BC) but I have have 92 tools that go from (A) to about (CM) so that lone filter tool would not cut it.

 

Is there something that can dynamically read the Ids like (AA) for example and give me a block of code for each ID containing the 10 roes above and the 10 rows below ?

 

This script is 25k lines long 

Carlos_Tovar
7 - Meteor

That was just an example and I need something Dynamic that can match the ID (AA) or (BC) for example there are 92 IDs and give be a block of code 10 rows before and 10 rows after it.

MatthewO
Alteryx
Alteryx

@Carlos_Tovar the revised example uses a reference table to find a list of values.
image.png

Carlos_Tovar
7 - Meteor

Nice this worked thanks 

Labels