Alternative methods of doing a self-join?
- 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 have the following dataset I would like to join onto itself using Client and Date as the connectors, how can i achieve my results without using the join tool to join onto itself because it creates multiple duplicate records for each? Thanks in advance
Data:
Client | Date | Value 1 | Value 2 | Value 3 |
A | 2020-01-01 | 1 | 2 | 3 |
A | 2020-01-01 | 4 | 5 | 6 |
B | 2020-02-01 | 1 | 2 | 3 |
B | 2020-02-01 | 4 | 5 | 6 |
Desired result:
Client | Date | Value 1 | Value 2 | Value 3 | Value 4 | Value 5 | value 6 |
A | 2020-01-01 | 1 | 2 | 3 | 4 | 5 | 6 |
B | 2020-02-01 | 1 | 2 | 3 | 4 | 5 | 6 |
Solved! Go to Solution.
- Labels:
- Preparation
- Transformation
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here is how you can do it. This solution is dynamic.
Workflow:
Hope this helps : )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@overhead_press
I also gave a try.
I think the tricky part is the naming convention for the new header.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @overhead_press basically the same approach as @Qiu and @atcodedog05, but you can simplify the naming by using the add prefix option in the dynamic rename tool:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Interesting take @OllieClarke 🙂 guess there is a lot to learn about approaches.
Thank you for the knowledge share 😀
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@OllieClarke
Nice one.
I should keep this in mind.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Happy to help : ) @overhead_press
Cheers and have a nice day!
