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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Anonymous
Not applicable

Calling help from Pivoting Column Experts!

Hi guys, 

I've been wrapping my head around trying to pivot the table below (Current state). 
So far i have tried Grouping the field_name >> Adding Index >> Pivoting. However the id_user still contains multiple rows. Ideally it should only have one row. 
PivotCol.png
BR

J

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @Anonymous 
Select the field name column and pivot in the following way :

Ritaf1983_0-1698911531511.png

Result :

Ritaf1983_1-1698911565257.png

Pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

2 REPLIES 2
moonstnew
Frequent Visitor

Hi @Anonymous , Please use below M script to transform your data as mentioned above:

 

let
Source = Excel.Workbook(File.Contents("Your File Path"), null, true),
Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"ID_User", Int64.Type}, {"Field_Name", type text}, {"Field_Values", type text}}),
#"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Field_Name]), "Field_Name", "Field_Values")
in
#"Pivoted Column"

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

Ritaf1983
Super User
Super User

Hi @Anonymous 
Select the field name column and pivot in the following way :

Ritaf1983_0-1698911531511.png

Result :

Ritaf1983_1-1698911565257.png

Pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.