Hello,
How to append only the common records between 2 tables but only on that record row# and not the whole group?
Both the below tables are different datasets.
I tried using append, but then the data just duplicates and creates like a cross join.
I also tired using Join condition and its not working somehow.
Where would I be going wrong?
Group | Names | COUNT |
1 | A | 1 |
1 | B | 2 |
1 | C | 3 |
1 | D | 4 |
1 | E | 5 |
1 | F | 6 |
1 | Total | 21 |
2 | B | 4 |
2 | C | 5 |
2 | E | 6 |
2 | F | 7 |
2 | Summary | 22 |
Names | median |
Total | 5 |
Summary | 6 |
O/p expected.
Group | Names | COUNT | Median |
1 | A | 1 | |
1 | B | 2 | |
1 | C | 3 | |
1 | D | 4 | |
1 | E | 5 | |
1 | F | 6 | |
1 | Total | 21 | 5 |
2 | B | 4 | |
2 | C | 5 | |
2 | E | 6 | |
2 | F | 7 | |
2 | Summary | 22 | 6 |
Solved! Go to Solution.
Hey @madhurinani,
Here is one way to do this:
I use the record ID Tool to maintain the order after the Join.
For more information on some of the Tools used the community has some quick and easy videos on Join and the Sort Tool here https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Writing%20...
Any questions or issues please ask!
Hope that Helps
Ira Watt
Technical Consultant
Watt@Bulien.com
Add a Record Id, to use as a sort field
Join from Input 1 to Input 2 on field Names
Take the Left output anchor and the Join anchor and feed into a Union tool
Sort by the Record Id field
Optionally use a Select tool to drop the Record Id field
If you're just starting out, take some time and try Learn > Academy > Learning Paths
Chris
No worries @madhurinani 😄