Forum Discussion
List.Zip Returning an error
- Anonymous1 year ago
Hi Rick_S137 ,
Has the issue been resolved on your end? If so, please share your solution and mark it as "Accept as Solution." This will assist others in the community who are dealing with similar problems and help them find a solution more quickly.
Thank you.
Hi Rick_S137 , another solution you could look at. I'll attach the images of the output and the M code. The source used is file from the file attached by you below. Thanks
Here is the code used:
let
Source = Excel.CurrentWorkbook(){[Name="Table4"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"abc_X_123.stat.energize", Int64.Type}, {"abc_X_456.stat.energize", Int64.Type}, {"abc_X_789.stat.energize", Int64.Type}, {"abc_Y_123.stat.energize", Int64.Type}, {"abc_Z_123.stat.energize", Int64.Type}, {"abc_Z_456.stat.energize", Int64.Type}}),
Transposed = Table.FromRows(Table.ToColumns(Table.DemoteHeaders(#"Changed Type"))),
Delimit = Table.TransformColumns(Transposed, {{"Column1", each Text.BetweenDelimiters(_, "_", "_"), type text}}),
#"Grouped Rows" = Table.Group(Delimit, {"Column1"}, {{"All", each List.Sum ( List.RemoveNulls ( List.Combine ( List.Skip ( Table.ToColumns( _ ) ) ) ) )
}}),
Table = Table.PromoteHeaders(Table.FromRows(Table.ToColumns(#"Grouped Rows")))
in
Table