web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Powerapps and Lists an...
Power Apps
Answered

Powerapps and Lists and looking up SUM of similar items

(0) ShareShare
ReportReport
Posted on by 5

Hi,
Im working as paramedic and am completely new to coding world. 
Currently I got into voluntary project and I have to manage my own expenses, deliveries, logistics for it. Trying to reduce manual labor with stocktaking, inventory counts, orders, ec.
I have this ridiculously easy and terribly complicated issue 🙂 

Listing nrNameRequired amountExisting amountTrauma bag
1Painkiller205Alpha
2Painkiller2010Bravo
3Syringe 10 ml105Alpha
4Syringe 10 ml105Bravo

 
List is approximately 300 rows, unique items by "Name" column are about 150.
That "Required amount" represents combined sum for all trauma bags, irrelevant if they all in one bag or shared.
In total, I should have 20 painkiller pills available. 
Desired outcome would be:

NameRequired amountExisting amount
Painkiller2015
Syringe 10 ml1010

In such way, I should order 5 painkillers  and 0 syringes.


I have managed to put it into Gallery, using Filter, and even email it, but it sends all rows, not as unique  and summed items. 
Ends up like this:
Dear pharmacy, 
Painkiller 15 pcs
Painkiller 10 pcs
Syringe 5 pcs
Syringe 5 pcs.


I am missing something very very obvious, I spent whole yesterday trying to figure it out, using Distinct, ForAll and such, but I end up with logic's error or formula errors, because I dont know how to.
Thankful for all waypoints that help me to get there 🙂

Thanks,
Assar Aip.



Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    154,447 Most Valuable Professional on at

    Hi @Assar_Aip ,

    This should get you the outcome in your second table

    AddColumns(
     GroupBy(
     SPList,
     "Name",
     "Data"
     ),
     "RequiredAmount",
     Sum(
     Data,
     'Required amount'
     ),
     "ExistingAmount",
     Sum(
     Data,
     'Existing Amount'
     )
    )

     

    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.

    Visit my blog Practical Power Apps

  • Assar_Aip Profile Picture
    5 on at

    Thanks, 
    I replaced 

    "RequiredAmount",
     Sum(

    to 

    "RequiredAmount",
     Avg(

    And got exactly what I asked. 


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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard