GroupBy + Unpivot + Pivot

Hi
I created this post just to document my strategy for inserting values into columns (Unpivot). To achieve the desired result, I had to perform an UNPIVOT and then a PIVOT.

Here’s the step-by-step process:

  1. I have a table that was grouped by a “GroupBy node”.
  2. I needed to use the Unpivot Node to change the structure.
  3. I had to use PIVOT to change the structure again.

AS IS

MY GOAL TO BE

image

GroupBy

Unpivot

Pivot

I have achieved the results.

4 Likes

Hi @Felipereis50 -

Glad you found a solution. Did it end up being fairly simple, or a more sophisticated approach? I’m sure others would be interested to see what you ended up with.

2 Likes

Hi Scott

Actually, the solution is exactly what was informed in my initial post.

(I had to create the post and add a reply, just to see the “Solution” option and be able to flag it), informing that the solution was the one presented in the previous post.

:grin:

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.