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

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 II
Advocate II

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 II
Advocate II

Solution Found! 

Sum(ImportCart_Gallery_Cart.AllItems, ImportCart_Label_TotalPrice)

 

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."

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (4,687)