The "append fields" with unique id
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I am studying my teammate alteryx program, there have two tables
one is look like this:
id | amount | count |
1 | 123 | 1 |
2 | 567 | 1 |
2 | 321 | 1 |
and he just selected the unique id, then the table become like this:
id |
1 |
2 |
and one is look like this:
count | viollation |
2 | Y |
2 | N |
After he use the "append fields" to combine two table, the output should be like this right:
id | count | viollation |
1 | 2 | Y |
1 | 2 | N |
2 | 2 | Y |
2 | 2 | N |
But don't know why, the output is look like this:
id | count | viollation |
1 | 2 | Y |
1 | 2 | N |
Can anyone tell me whats going on? Thanks.
Solved! Go to Solution.
- Labels:
- Common Use Cases
- Help
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
count | viollation |
2 | Y |
or
count | viollation |
0 | N |
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You are assuming the output after the Formula tool should be like this,
count | viollation |
2 | Y |
2 | N |
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.
count | viollation |
2 | Y |
or
count | viollation |
0 | N |
or
count | viollation |
3 | Y |
![](/skins/images/D34B41DA407DC996E7BFF253AD24F7E2/responsive_peak/images/icon_anonymous_message.png)
- « Previous
-
- 1
- 2
- Next »