Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Joorge_C
Resolver II
Resolver II

Unpivot Multiple Row Levels into Columns (attributes)

Hello All,

Does anyone know the best way to Unpivot the multiple Rows into Columns?

Example

Move the Type 1, Type 2,FY, Month into Columns, while keeping the 3 Column values into a Single Column Value.

 

attribute and value.png

1 ACCEPTED SOLUTION
Joorge_C
Resolver II
Resolver II

Hello All, I was able to acomplish this via a concatenation of the attributes into a single columns, then transposing the entire table and unpivoting all the columns into rows.

 

Thanks all for your help and inputs!

View solution in original post

7 REPLIES 7
Joorge_C
Resolver II
Resolver II

Hello All, I was able to acomplish this via a concatenation of the attributes into a single columns, then transposing the entire table and unpivoting all the columns into rows.

 

Thanks all for your help and inputs!

@Joorge_C Sorry, would you mind explaining how you did it? I'm having the same problem and not having any luck doing it the way you said...

Hi Clara,

Try to concatenate all your main categorization attributes (because once you transpose and you will loose columns), then move this concatenated New Column to the begginign of the table (1st Column).

 

Then Transpose the entire table and promote to headers (you should see the concatenated column at header level)

 

Now select the values column and Pivot into a single column.

 

Lastly just delimit your concatenated column to have all your attributes back broken in columns,

Oh I see! Thank you! I'll try that

v-yuta-msft
Community Support
Community Support

Hi Joorge_C,

 

What does "into a Single Column Value" mean? Could you please give a demo to clarify more details about it?

 

Regards,

Jimmy Tao

Hello Jimmy, Thanks for your help.

 

So essentialy have a single Value Column with different rows for Months.

 

Currently the Months and other Fields are as Columns, so Im trying to move them to Rows and keeping a Single colum row for the Sales Numeric Values we see now accross 3 Columns.

 

Thanks

Jorge

Hi Joorge_C,

 

As a general solution, you can duplicate the table, in the original table, you can remove rows under the first 4 rows, then unpivot these columns. In the second table, you an remove first 4 rows, then do "Unpivot Operation". Then merge two tables together.

 

Regards,

Jimmy Tao

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.