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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
MTBradley
New 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, but it did not return the results I needed. I am new at this and just may not understand how to use it yet.

 

Thank you in advance! 

 

MTBradley_0-1716226663863.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @MTBradley ,

Here is my sample data:

vjunyantmsft_0-1716255532612.png


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:

vjunyantmsft_1-1716255563562.png


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.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @MTBradley ,

Here is my sample data:

vjunyantmsft_0-1716255532612.png


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:

vjunyantmsft_1-1716255563562.png


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.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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 Kudoed Authors