Announcements
Hi everyone. I have a SharePoint list that I am using in a DataTable. These are orders placed to our website from our customers. Each item ordered has its own line, but the order# (DRMNum in this case) may be duplicated in the list if multiple items were ordered. I would like to be able to SUM the GrandTotal column based on the DRMnum if thats possible. So for each order show only 1 row with the DRMNum and the sum of the GrandTotal of all items ordered.
Thanks for the help!
Chris
Hi @Anonymous ,
You can do this using GroupBy() on the data source if displayed in a gallery, but not in a data table.
Hi @WarrenBelz thank you very much! My Items portion of my Gallery is set to GroupBy(DepotPlacedOrders,"DRMNum","DATA") and it is grouping the DRMNum properly. How do I SUM the GrandTotal field or add other info into the gallery from my list?
Thanks again!
Try
AddColumns( GroupBy( DepotPlacedOrders, "DRMNum", "DATA" ), "GTotal", Sum(DATA,GrandTotal) )
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
@WarrenBelz Perfect, thank you again sir!
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Haque 70
WarrenBelz 64 Most Valuable Professional
Kalathiya 36 Super User 2026 Season 1