Forum Discussion
MTBradley
2 years agoNew Member
Merge Duplicate from Column and Add the Integers
Hello. I would like to merge the duplicates in "Device Name" #1, and add the integers in column "Total (Sheets) #2". The other data can just be seperated by a comma. I tried merge queries, bu...
- Anonymous2 years ago
Hi MTBradley ,
Here is my sample data:
Please use this M function to add a custom column:let currentDeviceName = [Device Name], allRows = Table.SelectRows(#"Changed Type", each [Device Name] = currentDeviceName), allTotals = allRows[#"Total (Sheets)"], concatenatedTotals = Text.Combine(List.Transform(allTotals, each Text.From(_)), ",") in concatenatedTotalsAnd the final output is as below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
Hi MTBradley ,
Here is my sample data:
Please use this M function to add a custom column:
let
currentDeviceName = [Device Name],
allRows = Table.SelectRows(#"Changed Type", each [Device Name] = currentDeviceName),
allTotals = allRows[#"Total (Sheets)"],
concatenatedTotals = Text.Combine(List.Transform(allTotals, each Text.From(_)), ",")
in
concatenatedTotals
And the final output is as below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.