Sum ref values in virtual colum

Hi, really apreciate any help on this one.
I have Table students and table payment.

In table payment i have the column “student name” wich is ref from column student-name from student table
So when i add a payment i select the student name, so far so good. I even have a “related payments” in my students table view.

I need to create a virtual column in the student table that will show me the sum of the amount of the diferent payment of each student . I do have this value in the related payment view Group aggregate SUM:: AMOUNT that is exactly the value that i need to put in a virtual column in student table. I tried this virtual column formula in student table: sum(SELECT(Payment[amount], ([student-name] = [_THISROW].[student-name])))
but its not correct, doesnt add anything.
Thanks in advance

Solved Solved
0 2 235
1 ACCEPTED SOLUTION

sum(select(Payment[Amount], [student-name] = [_THISROW]))

View solution in original post

2 REPLIES 2

sum(select(Payment[Amount], [student-name] = [_THISROW]))

Try

Sum(Related Payments[Payment])

I assumed your field that holds the actual amount paid was called Payment, but just change it to the correct one.

Top Labels in this Space