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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 519

#2
WarrenBelz Profile Picture

WarrenBelz 439 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 433

Last 30 days Overall leaderboard