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 / Use related records in...
Power Apps
Answered

Use related records in calculated column to calculate average score.

(0) ShareShare
ReportReport
Posted on by 124

In my canvas app I have two Dataverse tables Student and Test, one student can attempt many tests so the relationship is one-to-many.

In Test table I have the score column (Decimal number) which contains the score for the test that the student has attempted. Now in the Student table I want to create a calculated column which will contain the average score of the attempted tests by the student.

 

Example

Student A attempts 2 tests

Test 1 - Score 80

Test 2 - Score 90

Student A average score 85

 

Note: Average score must be saved in database.

I have the same question (0)
  • Verified answer
    Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @Usman2 ,

    You can utilize Rollup fields for this purpose as rollup fields can do Avg as one of the calculations...  (I know this references on premises but the details are the same):

    https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/define-rollup-fields?view=op-9-1 

     

    Here is a video showing details on rollup columns:  https://youtu.be/ntk57m4A9ko 

     

  • Usman2 Profile Picture
    124 on at

    @dpoggemann 

    Thanks for the solution but now I have one more problem as I thought about it I think that the relationship between Student and Test will be N-to-N will this roll up columns still work. Because in the video the guy says it will not work for N-to-N relation.

  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @Usman2 ,

    No, this will not work with N:N relationships.  My recommendation is to create an intersect entity like the following:

    Student --> Student Test <-- Test

     

    1:N from Student to Student Test

    1:N from Test to Student Test

     

    This way you can store metadata on the Student Test entity (including score) and you will be able to do the rollup on the Student to the Test scores or on the Test to the Student Tests...

     

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!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard