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 / How to sum the column ...
Power Apps
Answered

How to sum the column of a nested horizontal gallery

(0) ShareShare
ReportReport
Posted on by 38

How can I add a total row in the form that sums the nested gallery items? 

 

Parent Gallery: 

 

 

 

Filter(
ShowColumns([@LineHeaders],
"ID",
"Title",
"FK_Cmit_Lhdr",
"AccountDecrease",
"AccountIncrease",
"Remark",
"TransactionTerm",
"TransactionType",
"LineStatus",
"fyValues"
 ),
FK_Cmit_Lhdr.Value=varComit.Title)

 

 

 

 

 

Child Gallery Items: 

 

 

 

With({val:
 Split(ThisItem.fyValues,"|")},

 ForAll(Sequence(CountRows(val)/4, 1, 4),
 {fyAmt:Value(Last(FirstN(val, Value)).Result),
 fyKeyi:Last(FirstN(val, Value+1)).Result,
 fyStat:Last(FirstN(val, Value+2)).Result,
 fyPk:Last(FirstN(val, Value+3)).Result}
 ) 
)

 

 

The Year headers are in a separate gallery with Items: Sequence(varComit.NumberofYears, varComit.FYStart,1)

jzy5282_0-1657888864633.png

expanded to show FY on the child gallery:

jzy5282_0-1657889128902.png

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @jzy5282,

    Do you want to sum the total number within a Label outside the Gallery?

     

    If you want to sum the whole column value, you just need to add a Label outside the Gallery, and set the text property as below:

    Sum(ChildGallery.AllItems,Label_In_ChildGallery.Text)
  • faruk1 Profile Picture
    110 on at

    I Tried but not working , can you give me better solution

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 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard