Skip to main content

Notifications

Power Apps - Building Power Apps
Suggested answer

Look up and sum

(1) ShareShare
ReportReport
Posted on by 78
HI Expert
I have two list :Parent and Child
and trying to sum the value of child based on the parent Name from Parent List
 
 
COndition: For a parent id you can have multiple child
 
Parent Name Child ID Child Name
A 1 CAseA-1
A 2 CAseA-2
A 3 CAseA-3
B 1 CaseB-1
 
i have two status field 
Approval Status
Approved
Approved
Pending
Open
 
RemediationStaus
Closed
Open
Closed
Open
 
Requirement: 
Parent Name Child ID Child Name Approval Status Amount RemediationStaus
A 1 CAseA-1 Approved 50000 Closed
A 2 CAseA-2 Open 5000 Open
A 3 CAseA-3 Pending 10000 Closed
B 1 CaseB-1 Open 50000 Open
A 4 CAseA-4 Approved 8000 Closed
 
Principle Amount=Sum of All the Child based on Parent name. for example: for above the principle amount for Parent A=50000+5000+10000+8000=73000
 
O/S value = Sum of all the value where the remediation status is open For example: O/S value for Parent A=5000+10000 =15000 because the approval status for child 3 is pending
 
Implemented Value= Sum of All the value when approval status is Approved and remediation status is closed for example: Implemented Value for A=50000+8000=58000
 
Please help
 
 
  • Suggested answer
    bscarlavai33 Profile Picture
    bscarlavai33 513 on at
    Lookup and sum
    Rollup fields should be able to accomplish this. Create 3 rollup fields, 1 fort Principle Amount, 1 for O/S Value and 1 for Implemented Value.

    https://learn.microsoft.com/en-us/power-apps/maker/data-platform/define-rollup-fields#rollup-columns-benefits-and-capabilities
  • Suggested answer
    Lookup and sum
    After setting up your filters the way you need, I sum columns :
    The output in the Compose is the Select Output
    xpath(xml(outputs('Compose')), 'sum(//root/total)')
     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard