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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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