Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III

using the sum function between two galleries



I am looking to sum items from one gallery and display the sum in another gallery. I have figured out the formula that needs to be used: Sum(Gallery1.Allitems, Value(January.Text))


My hold up is I can't go back to the oringal gallery screen because that causes circular reference. Which I get... I am using the first gallery to filter the second gallery. So to avoid the circular reference I have created a third gallery which is identical to first gallery but it does not cause a circular reference. At the bottom of the second gallery I have the formula working exactly how it should work but I am unsure of how to take that label and update the third gallery where they will submit that number back to excel table. I have attached photos of each gallery. 


So to walk you through what is happening with these galleries: 

Censu gallery displays the indicator and each month.

Census Screen.JPG

When they click on the textbox for each month it will then navigate to neighbourhood census screen where they will enter the data. As you can see at the bottom of the screen I have the formula working correctly for sum the Janaury Fields (yes there is more data that you can't see).

Census Neighbourhood Screen.JPG

From there when they click on calculate village total is where they navigate to the third gallery where I would like to display the total from the pervious screen based on month. Where the red arrow is where the number 16 from the previous screen should go. 

Census Village Total.JPG

They will then submit that number and the page will refresh to the first gallery page where it will display the total census. 


Hope this make sense. 



Super User
Super User


I started to build a response and then realized that the details and information were more challenging to, it seemed much easier to just throw together an App to demonstrate.

Take a look at the attached App.  I don't know all the details on your data or process flow, but this shows how you can utilize information between Galleries.  Actually, you'll see that the real point to be made is that you're not sharing between the galleries, you are really just working with the data source that the galleries use.


Take a look and post back if you have any questions.

I hope it is helpful.

Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,172)