cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CaiChicken
Advocate I
Advocate I

How to sum a Gallery Column

Hello Community,

 

This question might be asked many times but my case is a bit complexPic1.PNG

 

I need to Sum up Total Price, 

The formula for Total Price is 

 

ThisItem.'Trade Price'*SearchCart_TextInput_Quantity.Text*(100-SearchCart_TextInput_Discount)/100

 

 

Item list from this gallery is from a Collection where each items are manually added (Not a filter).

And it is a nested table (This is another issue I encounter, not very sure how to convert to normal table)

pic2.PNG

 

Any help appreciated,

 

Thanks in advance.

2 ACCEPTED SOLUTIONS

Accepted Solutions
CaiChicken
Advocate I
Advocate I

Solution Found! 

Sum(ImportCart_Gallery_Cart.AllItems, ImportCart_Label_TotalPrice)

 

View solution in original post

mdevaney
Super User
Super User

@CaiChicken 

Is the Total Price being displayed using a label called Import_Label_TotalPrice?

 

If yes, please put this code in the Text property of a new label to display the SUM.

Sum(    
    AddColumns(
        Gallery1.AllItems,
        "TotalPrice",
        Value(Import_Label_TotalPrice.Text)
    ),
    "TotalPrice"
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

2 REPLIES 2
CaiChicken
Advocate I
Advocate I

Solution Found! 

Sum(ImportCart_Gallery_Cart.AllItems, ImportCart_Label_TotalPrice)

 

View solution in original post

mdevaney
Super User
Super User

@CaiChicken 

Is the Total Price being displayed using a label called Import_Label_TotalPrice?

 

If yes, please put this code in the Text property of a new label to display the SUM.

Sum(    
    AddColumns(
        Gallery1.AllItems,
        "TotalPrice",
        Value(Import_Label_TotalPrice.Text)
    ),
    "TotalPrice"
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,704)