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

Row into columns for value

Hi,

i have this data:

image.png

 

 

 

 

 

i have 4 rows for the same WTPARTNUMBER, the only different value is the column "MDP_PLM_Superse"

 

I want to transoform this into 1 row and X new columns based on "MDP_PLM_Superse".

 

I've tried with power query "pivot column" and "not aggregate" but it return me "compex data type" error.

 

Is this possible?

 

Thanks

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

Can this help?

1.gif

Best Regards,

Xue Ding

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

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
Greg_Deckler
Community Champion
Community Champion

Duplicate your last column. Select Pivot column on this new column and select for values your original last column. Don't aggregate.

 

let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSspJzFDSUcrPSwWSJeX5IDKjKBXEM1SK1cGrwIiQAmNCCkyUYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t, Column4 = _t, Column5 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}, {"Column4", type text}, {"Column5", Int64.Type}}),
#"Duplicated Column" = Table.DuplicateColumn(#"Changed Type", "Column5", "Column5 - Copy"),
#"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Duplicated Column", {{"Column5 - Copy", type text}}, "en-US"), List.Distinct(Table.TransformColumnTypes(#"Duplicated Column", {{"Column5 - Copy", type text}}, "en-US")[#"Column5 - Copy"]), "Column5 - Copy", "Column5")
in
#"Pivoted Column"



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi,

 

this made a lot of column with the values name..

 

Hi @Anonymous ,

Can this help?

1.gif

Best Regards,

Xue Ding

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

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

please demonstrate what you are trying to do with an example of what you are expecting as this isn't very clear.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

In SQL Server you can use the PIVOT function to transform the data from rows to columns: select Firstname, Amount, PostalCode, LastName, AccountNumber from ( select value, columnname from yourtable ) d pivot ( max(value) for columnname in (Firstname, Amount, PostalCode, LastName, AccountNumber) ) piv;

vanessafvg
Community Champion
Community Champion

can you demonstrate what you are expecting and how many columns it creates?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

image.png

Like this

 

If there are other duplicates "WTPARTNUMBER" should be the same, columns will be "null" if are less

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.