Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
kzagorsky
Regular Visitor

How to subtract a column from a measure with a filter

 

I have a "Payments" table, which lists the payments received by a student for a specific course, each student may have several payments for a course. In another table "courses", I have the course price.

I've created a measure which summarizes the amount paid per student:

 

SumPaid = SUMX(VALUES(FACT_Payments[StudentId]),CALCULATE(SUM(FACT_Payments[Amount_paid])))

 

I need to create a measure which calculates the remaining amount to be paid. "SumPaid" - "CoursePrice" and I need this to be per student.

 

Thanks a lot!

1 ACCEPTED SOLUTION
prateekraina
Memorable Member
Memorable Member

Hi @kzagorsky,

 

Refer to this pbix for your answer. Let me know if you face any issues.

 

Prateek Raina

View solution in original post

3 REPLIES 3
prateekraina
Memorable Member
Memorable Member

Hi @kzagorsky,

 

Refer to this pbix for your answer. Let me know if you face any issues.

 

Prateek Raina

This was very helpful. Thank you very much!!!

Hi @kzagorsky,

 

Glad to know that it solved your problem. Kindly hit the thumbs up button for my answer.

 

Prateek Raina

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors