cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Combine Duplicate items in colum

I have a simple shopping cart collection with itemName and quantity. I would like to combine duplicate entries of an item and add up the number of the quantity. How can I achive this?

 

ItemQty
Laminating Pouches1
Laminating Pouches1
Laminating Pouches1
Laminating Pouches1
Laminating Pouches1

 

to 

 

ItemQty
Laminating Pouches5
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Combine Duplicate items in colum

I haven't don't much with it but I think this example can get you there. 

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-groupby

 

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: Combine Duplicate items in colum

I haven't don't much with it but I think this example can get you there. 

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-groupby

 

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training

View solution in original post

Highlighted
Frequent Visitor

Re: Combine Duplicate items in colum

Omg! Shane from BoldZebra!?

 

I'm so honored! Big fan of your tutorials by the way. 

Highlighted
Frequent Visitor

Re: Combine Duplicate items in column

It got it to work by grouping and creating 3 diffrent collections, from wich I did the sum of items on the last collection.

 

A Button preforms the following from the existing collection "ShoppingCart"

 

ClearCollect(ItemsByDes, GroupBy(ShoppingCart, "item", "qtys"));ClearCollect(ItemCount, AddColumns(ItemsByDes, "total of item", Sum(qtys, qty)))

 

Thanks for the reference!

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,860)