Hi All,
This is my first time using the generate rows tool and I could use some help. Essentially I have a table where the column "Key 2" has some records that contain the suffix -A,-B,-C and some that do not. I would like to duplicate my rows without a suffix and add the missing suffix on.
To break down what I want to do: IF the last two characters in Key 2 does not contain -A,-B, or -C then duplicate that row and add -A, -B, and -C to those rows as needed.
If my original table is:
Key 1 | Key 2 |
A1 | ABC-A |
A1 | ABC-B |
A1 | ABC-C |
B2 | CBA |
B2 | CBA-A |
C3 | ZZZ |
D4 | DDD |
I want to go to:
Key 1 | Key 2 |
A1 | ABC-A |
A1 | ABC-B |
A1 | ABC-C |
B2 | CBA |
B2 | CBA-A |
B2 | CBA-B |
B2 | CBA-C |
C3 | ZZZ |
C3 | ZZZ-A |
C3 | ZZZ-B |
C3 | ZZZ-C |
D4 | DDD |
D4 | DDD-A |
D4 | DDD-B |
D4 | DDD-C |
I feel like this is a generate rows function and I'm having trouble figuring out the syntax/setup. Let me know if you have any ideas!
Hi @Anthony_A2
Here is how you can do it. I am creating the comibations and keeping only single occurence.
Workflow:
Hope this helps : )
Hi @Anthony_A2
Here's my solution to this: