Alteryx Designer Desktop Discussions

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

The "append fields" with unique id

chuntingsimonlo
6 - Meteoroid

I am studying my teammate alteryx program, there have two tables
one is look like this:

idamountcount
11231
2567

1

2321

1

 

and he just selected the unique id, then the table become like this:

id
1
2


and one is look like this:

countviollation
2Y
2N


After he use the "append fields" to combine two table, the output should be like this right:

idcountviollation
12Y
12N
22Y
22N


But don't know why, the output is look like this: 

idcountviollation
12Y
12N


Can anyone tell me whats going on? Thanks.

12 REPLIES 12
chuntingsimonlo
6 - Meteoroid

Hi Shanker V
Can i assume that it join based on the same index?
Because i need to do the code conversion from the alteryx to python,
that's why i need to understand the logic, thanks a lot.  

ShankerV
17 - Castor

Hi @chuntingsimonlo 

 

Post the Count Records tool, the formula tool with IF condition stores only value Y or N.

Consider the IF returns the value Y.

So the value passed to Append Fields is 

countviollation
2Y

 

or 

 

countviollation
0N

 

The same then is being append with the output from the Unique tool. 

Consider the Unique tool give the output.

 

id
1
2

 

So these both gets append.

 

Many thanks

Shanker V

ShankerV
17 - Castor

Hi @chuntingsimonlo 

 

You are assuming the output after the Formula tool should be like this, 

 

countviollation
2Y
2N

 

Hence you consider the append fields working by mistake, but not its working as expected as the output generated is only.

 

Any one of the below.

countviollation
2Y

 

or 

 

countviollation

0

N

 

or 

 

countviollation
3Y
Labels
Top Solution Authors