PIvot, Unpivot groupby?

|Serial no.| ID |Result|

|abc| 123 |abc-123|
|def| 345 |abc-345|
|ghi| 567 |abc-567|
789 |abc-789|
def-123|
def-345|
def-567|
def-789|
ghi-123|
ghi-345|
ghi-567|
ghi-789|

My query is for each serial number there should be an id AND i WANT THEM IN third column as Result. So basically I want a combination(result) of serial number and ID, IN SUCH A WAY THAT EACH SERIAL NUMBER SHOULD have all possible id. I tried to unpivot and then groupby serial no. but it didnt give me the desired result.
Any help is appreciated.

@tommy Any help ideas?

@aworker @mlauber71 @ipazin @HansS Following your previous thread of unpivoting and pivoting but not getting this result.

@hansa to be honest I do not fully understand what you want. Maybe you could provide a complete example of what your data looks like and what you expect as a result.

Then I would recommend if at all only tagging people with specific questions with regards to what they have said and done and maybe wait some time. Most of us do this in our free time and there are things like time zones :slight_smile:

I am Sorry, I am a new user here. I made an error while posting the query and I was trying to follow the instructions of your previous answers regarding the same thing.

Here is attached excel file and result that is needed.
book2.xlsx (8.8 KB)

Thanks in advance for your help and guidance.

Hi @hansa

Tnx for the input data you provided, that helps!
See this wf pivot_unpivot_or_crossjoin.knwf (32.7 KB) . It uses a CrossJoiner node. The Column Filter node selects the relevant columns, you can concatenate to the expected result.

.
gr. Hans

5 Likes