Forum Discussion
Duplicate Values after 2x Split Column and Unpivot
Hello Everyone, I am struggling to achieve the desired output listed below. I have data coming from SharePoint with multiple values in a single cell separated by a comma. I was able to sucessfully split the columns and unpivot them, but now I have a huge mess of duplications. Does anyone know how I can obtain the desired output from raw data example below?
- Anonymous3 years ago
Hi Anonymous ,
Please have a try.
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Lca7DYAwDEXRVZBrF37xN3vQRSkzAewvAqK594xBQBMgehS/DKSlfkyIhBHTua77wIZV7pYXLMVV+Seicfe9EnWjOR8=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"SO #" = _t, CUSTOMER = _t, total = _t, CMR = _t]), Custom1 = Table.FromColumns(List.Transform(Table.ToColumns(Source),each Text.Split(_{0},",")),Table.ColumnNames(Source)) in Custom1How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ PollyIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Hi Anonymous ,
Please have a try.
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Lca7DYAwDEXRVZBrF37xN3vQRSkzAewvAqK594xBQBMgehS/DKSlfkyIhBHTua77wIZV7pYXLMVV+Seicfe9EnWjOR8=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"SO #" = _t, CUSTOMER = _t, total = _t, CMR = _t]), Custom1 = Table.FromColumns(List.Transform(Table.ToColumns(Source),each Text.Split(_{0},",")),Table.ColumnNames(Source)) in Custom1How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ PollyIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.