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 / I have to SUM the valu...
Power Apps
Answered

I have to SUM the value from Three Gallery and show it to the another gallery.

(0) ShareShare
ReportReport
Posted on by 272

Hello, 

I have 3 gallery which has a Common column as "Total Cost" in this column their is some value  which has to be added and show it to the another gallery. for example:  

Gallery One - 100

Gallery Two - 200

Gallery Three - 300 and the Fourth gallery should Sum all the 3 gallery value and show it in Gallery four as -

Gallery Four - 600 .

 

As you can see below screenshot how it should work

 

B8_0-1700561498414.png

 

Categories:
  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Hi @B8 

     

    Try this

     

    Sum(GalleryOne.AllItems, TotalCost) + Sum(GalleryTwo.AllItems, TotalCost) + Sum(GalleryThree.AllItems, TotalCost)

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

     

  • B8 Profile Picture
    272 on at

    In Fourth Gallery Item? 

     

    or 

     

    in Fourth Gallery TextInput?

     

  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Fourth Gallery TextInput or Label control where you want to display it.

  • B8 Profile Picture
    272 on at

    B8_0-1700562601514.png

    please check the above Screenshot it has total all the values but I want it should only add the value which are in a row similarly the second row should add again like - 

     

    1320.64 +  2500 = 3820.64 and

    1380.64 + 1200.00 = 2580.64

     

  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    If you want to sum the values row by row, you need to ensure that each gallery has the same number of items and that the items are in the correct order.

     

    Sum(
    Filter(
    GalleryOne.AllItems,
    ID = ThisItem.ID
    ),
    TotalCost
    ) + Sum(
    Filter(
    GalleryTwo.AllItems,
    ID = ThisItem.ID
    ),
    TotalCost
    ) + Sum(
    Filter(
    GalleryThree.AllItems,
    ID = ThisItem.ID
    ),
    TotalCost
    )

    This formula adds the "Total Cost" from the item in Gallery One, Gallery Two, and Gallery Three that has the same ID as the current item in Gallery Four.

  • B8 Profile Picture
    272 on at

    B8_0-1700568652826.png

     

    In my case i added your formula in Gallery TextInput its giving me this

     

  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    That 3 galleries contains same data source or different ?

  • B8 Profile Picture
    272 on at

    All the 3 gallery have different data source

     

    1. Resource Data Table 

    2. Material Data Table

    3. Rental Data Table

  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Is there an any primary key across these three data sources? If not, it could pose a challenge.

  • B8 Profile Picture
    272 on at

    Yes, These 3 column are same in all the all the data source

     

    B8_0-1700643696161.png

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard