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 / Dataverse table relati...
Power Apps
Answered

Dataverse table relationships and using it to help sum columns

(0) ShareShare
ReportReport
Posted on by 77

I am officially stumped. 

 

I have learned how table relationships helps with performance. 

 

I have two tables. One called Users with 'Year Group' as a choice column ranging from 1 - 6. I have a second table called points which contains a lookup column for student ID from the Users table.

 

Each user can have multiple records in the points table. 

 

I would like to sum up the points for the users that are in Year 1 for example, How might the formula look? 

 

I have tried this, but this is not working.

 

Sum( Filter( 'Points', LookUp(Users, ID = ID).['Year Group'] = 1), 'Earned Points' )

 

Could this be the solution: 

 

ClearCollect( UserHousepointTotals, ForAll( BSKL_Users, { UserID: ID, TotalHousepoints: Sum( Filter( 'Housepoint Transactions', 'Student ID' = ID ), 'Earned Housepoints' ) } ) )

 

Any help would be greatly appreciated.

 

@WarrenBelz, @SpongYe  @FLMike Can you offer any advice for me, please?

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

    @lmcc What is your lookup column in the table 'Points' called? For now I'll assume it's studentID. If so, the following formula should you point you in the right direction:

     

    Sum(Filter('Points', 'studentID'.'Year Group' = 1), 'Earned Points')  

     

  • lmcc Profile Picture
    77 on at

    @NPPlatform I can't believe it was so simple in the end. This has really helped me - thank you very much!

  • Verified answer
    NPPlatform Profile Picture
    606 Moderator on at

    You're welcome! Glad I could help you. Just so you understand why it's working: a lookup column is a reference to another record. This referenced record has its own values. In your example the record is a row in the table Users with a value for Student ID, a value for Year Group and probably also values like 'Name', 'Mail', 'Age, and so on. You can access all this information through the lookup-column in your table Points, with the formula [name of lookup-column].[name of desired value]. Best of luck with your app!

  • lmcc Profile Picture
    77 on at

    Thank you for taking the time to explain the code. Beginners like me really thrive off helpful people such as yourself - take care! 

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
WarrenBelz Profile Picture

WarrenBelz 519 Most Valuable Professional

#2
11manish Profile Picture

11manish 489

#3
Haque Profile Picture

Haque 327

Last 30 days Overall leaderboard