Free Trial

Alteryx Designer Desktop Discussions

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

Filter Formula to Isolate Data In Between Two Fields

dmpope
8 - Asteroid

Hi there,

 

Below is a screenshot of an example of data. I'm trying to filter on the "Bank A ##### Page 1" line and "Bank A Total ####" line but I also need all of the lines in between. However, I'm not sure what kind of expressions to use in the Custom Filter tool. Would someone be able to help me with this?

 

dmpope_0-1647447397625.png

 

Thank you!

 

6 REPLIES 6
binuacs
21 - Polaris

@dmpope  try to use

!Contains[Field1],'Bank A'

atcodedog05
22 - Nova
22 - Nova

Hi @dmpope 

 

Here is how you can do it. Assuming bank is there at start and end.

Workflow:

atcodedog05_0-1647448332188.png

 

Or

atcodedog05_0-1647448389115.png

 

Hope this helps : )

 

messi007
15 - Aurora
15 - Aurora

@dmpope,

 

You can do this with a filtre tool : 

 

messi007_0-1647448315905.png

 

Attached the workflow,

Hope this helps!

Regards,

dmpope
8 - Asteroid

Hi @atcodedog05,

 

Your first solution seems to be the one that I need. My only issue is looking back at my actual data (this is an 8M line file) I'm seeing that Bank doesn't exist in the last line that I need. But there is "Grand Total". Is there additional conditions I can add into this formula to make that work?

 

dmpope_0-1647520812296.png

 

 

Thank you!

OllieClarke
15 - Aurora
15 - Aurora

Hey @dmpope,

 

Simply update @atcodedog05 first formula to read:

IF contains([f1],'Bank') THEN 1
ELSEIF contains([f1],'Grand Total') THEN 1 
ELSE 0
ENDIF

and everything else should follow (assuming that none of the unneeded rows contain 'Grand Total')

 

Ollie

dmpope
8 - Asteroid

Hi atcodedog05,

 

Sorry to circle back to this, but I'm having an issue with the multi-row formula you provided and hoping you can help! At the end of my data (after the last filled in row in the Start column), the block column is still carrying the 1 beyond the data that I needed to label. Is there a way that I can change those to zeros? Below is a screenshot of the output from the browse tool after the multi-row formula tool (I had to black out information for privacy reasons).

 

 

dmpope_3-1647969568232.png

 

And here is the screenshot of the example workflow output of what I should be expecting with my file:

 

 

dmpope_5-1647969667012.png

I'm not exactly sure why this is happening. In my first IF formula, I used the formlay like Ollie suggest but I copy and pasted the exact fields on which I'm labeling for the Start column. Then the multi-row formula is exactly as you had in your attached workflow. 

 

Thank you!

 

 

 

 

 

 

 

Labels
Top Solution Authors