Number of combinations for a record
- 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
Hi,
I’m hoping this will be a fairly straight forward one for the community.
I need to create a view of all the different variable combinations for each record. Within the dataset, the number of variables per record varies so it can’t have any restrictions on the amount of possible combinations.
Below is the current input I have and then the desired output.
Input:
Record ID | Variable1 |
1 | 1 |
1 | 2 |
2 | 1 |
2 | 2 |
2 | 3 |
Output:
Record ID | Variable1 | Variable2 |
1 | 1 | 1 |
1 | 1 | 2 |
1 | 2 | 1 |
1 | 2 | 2 |
2 | 1 | 1 |
2 | 1 | 2 |
2 | 1 | 3 |
2 | 2 | 1 |
2 | 2 | 2 |
2 | 2 | 3 |
2 | 3 | 1 |
2 | 3 | 2 |
2 | 3 | 3 |
Hope this makes sense but let me know if you need any more information.
Many thanks.
Alex
Solved! Go to Solution.
- Labels:
- Datasets
- Preparation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @AlexC1709, screenshots are broken but I've attached a simple workflow here that just conducts a self-join on RecordID. Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@AlexC1709 One way of doing this with the batch macro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks DataNath.
Thought it would be a fairly simple one.
Thanks again