cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kzagorsky Frequent Visitor
Frequent 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

Accepted Solutions
prateekraina New Contributor
New Contributor

Re: How to subtract a column from a measure with a filter

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 New Contributor
New Contributor

Re: How to subtract a column from a measure with a filter

Hi @kzagorsky,

 

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

 

Prateek Raina

View solution in original post

kzagorsky Frequent Visitor
Frequent Visitor

Re: How to subtract a column from a measure with a filter

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

prateekraina New Contributor
New Contributor

Re: How to subtract a column from a measure with a filter

Hi @kzagorsky,

 

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

 

Prateek Raina

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 55 members 1,214 guests
Please welcome our newest community members: