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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Collect the Weight of ...
Power Apps
Answered

Collect the Weight of All Items in Gallery and Add them to the Current Total

(0) ShareShare
ReportReport
Posted on by 5,325 Super User 2025 Season 2
I have Label1, which needs to calculate the total new SOW weights added in Gallery2
and add that total to the existing total weight of all SOWs in Label1.


I have Gallery1, which is retrieving existing data from colProduction, including
existing SOW weight. This is just a visual of all SOWs and their weight, and does
not impact the calculation formula.


I have Gallery2, which allows the user to added additional SOW data, including
additional weights.



Example:
On screen open Total Output Weight is displayed as 1,536 (the total of all SOWs
in the dataset associated with this Production.

Label1 with Total Output Weight (Gallery2 is blank).


Gallery1 (static visual) will list ALL SOWs in this Production. For this example, there
is only one SOW in the dataset - Total SOW Weight 1,536 lbs.


Gallery2, shows where I've added two new SOWs and weights.

When I added the first SOW (of 1,000 lbs) to total in the label increased to 2,536.

When I added the second SOW (of 2,000 lbs) the total in Label1 was increased from the
original 1,536 to 3,536, meaning the calculation only increased the Total weight by the
LAST item added, rather than by ALL SOW weights in Gallery2.

The actual Total Output Weight in Label1 should show as 4,536.

I know the issue resides in my Label1 formula, but I can't figure out how to write
the formula (below) so that it adds ALL EPSSG_SOW_Weight_Fld items from Gallery2
to my calculation.

What am I missing?

Label1 -


Gallery1 Total Output Weight Label has -
Sum(EPS_Active_SOW_Gallery.AllItems,SOW_Weight) +
EPS_Add_SOW_Gallery.Selected.EPSSG_SOW_Weight_Fld.Text

Gallery2 -



 
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at
    Unless I am missing something obvious here, why are you using EPS_Add_SOW_Gallery.Selected. when you want all items the same as the the first and use EPS_Add_SOW_Gallery.AllItems
  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at
    Are you suggesting that the following is the answer?
     
    Sum(EPS_Active_SOW_Gallery.AllItems,SOW_Weight +
    EPS_Add_SOW_Gallery.AllItems,SOW_Weight)
  • Verified answer
    WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at
    You have two choices of structures - you either add the selected item in a gallery 
    EPS_Add_SOW_Gallery.Selected.EPSSG_SOW_Weight_Fld.Text
    or the sum of all items in a gallery
    Sum(EPS_Active_SOW_Gallery.AllItems,SOW_Weight)
    so you simply need to combine whatever you want - if you want the sum of all items in both galleries
    Sum(EPS_Active_SOW_Gallery.AllItems, SOW_Weight) + 
    Sum(EPS_Add_SOW_Gallery.AllItems, Value(EPSSG_SOW_Weight_Fld.Text))
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard