web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Subtotal of related va...
Power Apps
Unanswered

Subtotal of related values from Power apps tables

(0) ShareShare
ReportReport
Posted on by 6

Hi

This should be the simplest task to accomplish but I just can't get it working and searching for solutions just seems to lead me down rabbit holes. 

I have 2 related tables in powerapps - 'Details' and 'Line Items'. The primary key from 'Details' (Details ID) is a lookup required for all entries in 'Line Items'. Each 'Line Item' entry has a value.

Ideally, I want the 'Details' table to contain a 'Line Items Total' field but the powerapps table interface doesn't seem to accept the sum(filter(... formula that I think I should use.

Details Table

Details IDLine Items Total (required formula column)
A15
B4
C6

 

Line Items Table

Line Item NumberDetail ID (required lookup)Line time value
001A10
002A5
003B4
004C1
005C2
006C3

 

I feel like there's a key aspect of this that I've missed as in an Access database this would have taken me about 5 minutes to accomplish through a query. I can't figure out what the equivalent of the query step is in the power platform ecosystem. I can't seem to access Power Query from the Power Apps interface I have. 

 

Any help would be greatly appreciated.

Categories:
I have the same question (0)
  • Verified answer
    NPPlatform Profile Picture
    606 Moderator on at

    Hi @User23567 , are you working with Dataverse? And do you want this column to be added in Dataverse? If so, you'll need to add a roll-up column. Check out this video on how to do this: https://www.youtube.com/watch?v=GvdmsPEkCYg

     

    Edit: If you only want to use line items total in a Power App, you don't have to add it to your datasource. You can calculate it inside of your app. To do so, create a gallery that has the Details-table as its items. Add a label to this gallery with the following code:

     

    Sum(
    Filter(
    'Line Items Table',
    'Detail ID'.'Detail' = ThisItem.'Detail'
    ),
    'Line Time value'
    )

     This will give you the sum of Line Time Value related to the row in your Gallery

  • User23567 Profile Picture
    6 on at

    Thanks @NPPlatform! I followed the video you provided and it sorted me out.

    You're the best 👏

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard