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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Not able to pivot columns in case there is a delimiter in the column values

Hi all,
I have the data in the below format - 

rohit1410_0-1662384583513.png

And I want to convert this data in the below format - 

rohit1410_1-1662384620860.png

Can someone help with the steps ?

I tried using the 'Split Column' and 'Pivot Column' but not able to get it right.

Thanks in advance

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUUpOLE7VKUjMyUkt0SlPzUzPKAEKGhroGBnoGBoYKMXqRCs5QZUBKSNTsIgzkAlRDNUK1gPSBNQRCwA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t]),
    Columns = Table.ColumnNames(Source),
    #"Separated text" = Table.TransformColumns(Source, {{Columns{1}, each Text.Split(_, ",")}, {Columns{2}, each Text.Split(_, ",")}}),
    #"Combined columns" = Table.CombineColumns(#"Separated text", List.Skip(Columns), each Record.FromList(_{1}, _{0}), "Combined"),
    #"Expanded Combined" = Table.ExpandRecordColumn(#"Combined columns", "Combined", {"case", "pallet", "weight"})
in
    #"Expanded Combined"

 

CNENFRNL_0-1662388420491.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

1 REPLY 1
CNENFRNL
Community Champion
Community Champion

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUUpOLE7VKUjMyUkt0SlPzUzPKAEKGhroGBnoGBoYKMXqRCs5QZUBKSNTsIgzkAlRDNUK1gPSBNQRCwA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t]),
    Columns = Table.ColumnNames(Source),
    #"Separated text" = Table.TransformColumns(Source, {{Columns{1}, each Text.Split(_, ",")}, {Columns{2}, each Text.Split(_, ",")}}),
    #"Combined columns" = Table.CombineColumns(#"Separated text", List.Skip(Columns), each Record.FromList(_{1}, _{0}), "Combined"),
    #"Expanded Combined" = Table.ExpandRecordColumn(#"Combined columns", "Combined", {"case", "pallet", "weight"})
in
    #"Expanded Combined"

 

CNENFRNL_0-1662388420491.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors