Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Alteryx is here to help you solve your biggest data challenges. Read about the new Virtual Solution Center here.

Loop through and filter based on column values

Highlighted
7 - Meteor

Hi,

 

I joined 2 data source using union. I forgot to mentioned that they are not in the same rows when comparing.. is there other approach I can use to compare both column from different data?

These are the fields I have Desc, name

 

The formula I used to filter is this I want to remove Desc that starts with the first 4 letter of values in the name column.

StartsWith([Desc], left([Name],4)) 

 

I also tried

Contains([Desc], left[Name].4)) result is the same.

 

additional requirement since the solution are not applicable.

I would like to check Desc against every value of Name to see if it is a match

 

what am I missing here? 

Highlighted
8 - Asteroid

Hello maleryx,

 

try this:

 

Left([Name], 4) != Left([DESC], 4)

 

DESCNameFilter
ABCDEEDCBATrue
QWERTQWERFalse
ASDFGASDFZFalse

 

Does this help?

Best regards,
David

Highlighted
14 - Magnetar

Sorry if this is a daft question: Do you get the right result in the false output of the filter tool? In that case, put a ! in front of startswith()

Highlighted
14 - Magnetar

Also, you say you joined with Union? That's a vertical join. Are the values for Desc and Name that you're comparing actually in the same row?

Highlighted
7 - Meteor

I have Union them in a way that I am not comparing the same row. Essentially, that the approach I went because I wanted to compare data1-Desc against data2-Name.. 

Highlighted
14 - Magnetar

perhaps you can share some sample data and workflow?

Highlighted
7 - Meteor

maleryx_0-1581588625872.png

DescName
xstm999111null
ltmm9111null
kkww01221xstm12121212s
xdtt91922itmm1222

 

Highlighted
14 - Magnetar

Using your data, the below shows a match for 1st row Desc and 3rd row Name. Row 2 and 4 is not a match because the I in one is a Uppercase and the other lowercase

 

DavidP_0-1581589542567.png

 

Highlighted
7 - Meteor

maleryx_0-1581590949611.png

mine doesn't work... i dont get the num rows

 

Highlighted
14 - Magnetar

Based on the data you shared, row-2 Desc should be compared to Name, so the formula is

 

!startswith([Row-2:Desc],left([Name],4))

Labels