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 / nested gallery sum for...
Power Apps
Unanswered

nested gallery sum for each records

(0) ShareShare
ReportReport
Posted on by 1,119

Hi there,

my gallery looks like below.

venka91_0-1672223271655.png

 

for the dates and two text boxes i used one more gallery within my main gallery.

Now i want to sum the text boxes in gallery B and show the result gallery A for each records. Kindly assist.

 

my formula in gallery A

 

GroupBy(Filter(SP_Milk,smon = dd_milkreportmonth.Selected.MonthName, syear= dd_milkreportyear.Selected.Result),"cow_name","cowGroup")

 

 

my formula in gallery B

 

AddColumns(ThisItem.cowGroup,"SumofMorning",Sum(morn_milk))

 

 

Categories:
I have the same question (0)
  • MithaliGupta Profile Picture
    242 on at

    @venka91 ; I would like to know if u are using Sharepoint to store the details ; if so; u can just use sum in Gallery B and Store the details and if u can elaborate more on ur issue will assist better

     

  • venka91 Profile Picture
    1,119 on at

    i am using sharepoint.

     

    Gallery A shows only the Cow names

    Gallery B shows its respective milking details for each day. each record here has two values morning milkyield and evening milkingyiled.

     

    Example

    for Animal_A in Gallery A, i would like to sum the values that is fetched in gallery B.

  • MithaliGupta Profile Picture
    242 on at

    @venka91 I think you can use SharePoint calculated column to help you best in this...Like Gallery B specific date morning count + evening Count = Total Count;

     

    Because specifically gallery will assist to display details calculations can be done better at the back end for accuracy;

     

    Hope this Answer's your concern;

    Please do accept this answer as solution

     

  • venka91 Profile Picture
    1,119 on at

    hi 

     

    my purpose is entirely different, and this way our customer want it to be designed. Please provide if you have idea on how do it in powerapps.

  • venka91 Profile Picture
    1,119 on at

    @cha_cha @WarrenBelz , anyone pls help.

  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    @venka91 

    In GalleryA, you should be able to add a label and use this syntax to work out the sum.

    Sum(GalleryB.AllItems, SumofMorning) + Sum(GalleryB.AllItems, SumofEvening)
  • venka91 Profile Picture
    1,119 on at

    Hi there,

     

    is it possible to get a day wise sum ?

    example in calendar day 1st, 2nd, 3rd etc ?

    venka91_0-1672297517828.png

     

     

  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    Hi @venka91 

    If you want to display a sum by day outside of the gallery, I suggest that you duplicate what you've done already but remove the call to GroupBy. That would effectively give you a grand total.

  • venka91 Profile Picture
    1,119 on at

    hi @timl 

     

    Thanks. I managed to do this by converting this gallery into Horizontal gallery and i was successfully able to generate the grand total and also able to show the milk yield date wise and this looks neatly.

     

    the only place where i failed, i am not able to import this gallery as PDF, as PDF function does not support nested gallery.

     

    i am also do not have much expertise in writing Power Automate flow, as even i would like to convert the gallery format as CSV table, this has records within records, so i am not sure how can i generate report in either csv / html or pdf.

     

    venka91_0-1672391943226.png

     

  • faruk1 Profile Picture
    110 on at

    Can i show this value outside of gallery, in forms datacard, i am getting error with this, please suggest

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard