cancel
Showing results for
Did you mean:
Frequent Visitor

## Sum of a calculated/lookup column

Dear Community

Problem
I want to display a total of all entries in a calculated column (Amount)

Setup:

SP List: Report:

 Title Hours Price Text Text Text Hans 2 5 Max 2 10

SP List: Customers

 Title Price Text Text Hans 5 Max 10

Powerapp: Gallary1:

 Title Hours Price Amount Text report.hours Lookup(Customers, ThisItem.Title = Title).Price Hours * Lookup(Customers, ThisItem.Title = Title).Price Hans 2 5 10 Max 2 10 20

Now i want a Text Label who SUM all Items in the Gallary Row "Amount" (10+20 = 30)

I cant do SUM(Gallary1.Allitems,Amount) because the Amount row has no Name ist calculatet (Hours * Price)

Thanks !

Levin

1 ACCEPTED SOLUTION

Accepted Solutions
Super User

I think I have an idea of what you are asking, and that this example should help you figure it out

In the above gallery I have the items from TestColl which is a test collection I made with this as its items

``Collect(TestColl,{Value1:1,Value2:10},{Value1:4,Value2:7},{Value1:3,Value2:20})``

the third label in the gallery is just the two items multipled.

In the label off to the right of the screenshot above you have the sum of all the multiplications in the gallery, achieved like so

``````Sum(
ForAll(
Gallery5.AllItems,
Value(ThisRecord.Title7_1.Text)
),

Value)
``````

where gakllery5 is my gallery, and Title7_1 is the control where the multiplication takes place

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!
3 REPLIES 3
Super User

I think I have an idea of what you are asking, and that this example should help you figure it out

In the above gallery I have the items from TestColl which is a test collection I made with this as its items

``Collect(TestColl,{Value1:1,Value2:10},{Value1:4,Value2:7},{Value1:3,Value2:20})``

the third label in the gallery is just the two items multipled.

In the label off to the right of the screenshot above you have the sum of all the multiplications in the gallery, achieved like so

``````Sum(
ForAll(
Gallery5.AllItems,
Value(ThisRecord.Title7_1.Text)
),

Value)
``````

where gakllery5 is my gallery, and Title7_1 is the control where the multiplication takes place

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!
Solution Supplier

@Premium Gallery' main function is to display data from the source.. now in your case the Amount that you are calculating is on the fly..  what's the Gallery' Items Property.?

Frequent Visitor

Thanks @TheRobRush this is exactly what I needed.It's really extreme how quickly help is given here, and probably voluntarily... That's very nice to see

greetings from Switzerland

Announcements

#### Tuesday Tip | How to Get Community Support

It's time for another Tuesday Tip, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.       This Week: All About Community Support Whether you're a seasoned community veteran or just getting started, you may need a bit of help from time to time! If you need to share feedback with the Community Engagement team about the community or are looking for ways we can assist you with user groups, events, or something else, Community Support is the place to start.   Community Support is part of every one of our communities, accessible to all our community members.   Within each community's Community Support page, you'll find three distinct areas, each with a different focus to help you when you need support from us most. Power Apps: https://powerusers.microsoft.com/t5/Community-Support/ct-p/pa_community_support Power Automate: https://powerusers.microsoft.com/t5/Community-Support/ct-p/mpa_community_support Power Pages: https://powerusers.microsoft.com/t5/Community-Support/ct-p/mpp_community_support Copilot Studio: https://powerusers.microsoft.com/t5/Community-Support/ct-p/pva_community-support   Community Support Form If you need more assistance, you can reach out to the Community Team via the Community support form. Choose the type of support you require and fill in the form accordingly. We will respond to you promptly.    Thank you for being an active part of our community. Your contributions make a difference!   Best Regards, The Community Management Team

#### Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp