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 nr | Name | Required amount | Existing amount | Trauma bag |
1 | Painkiller | 20 | 5 | Alpha |
2 | Painkiller | 20 | 10 | Bravo |
3 | Syringe 10 ml | 10 | 5 | Alpha |
4 | Syringe 10 ml | 10 | 5 | Bravo |
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:
Name | Required amount | Existing amount |
Painkiller | 20 | 15 |
Syringe 10 ml | 10 | 10 |
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.
Thanks,
I replaced
"RequiredAmount",
Sum(
to
"RequiredAmount",
Avg(
And got exactly what I asked.
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