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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
juhoneyighot
Helper III
Helper III

DAX Formula using Filter

Hello! I need help on this.

I have this matrix table. I have to get the difference confirmed invoices minus the invoices paid. Confirmed and Invoice Paid is a project invoice status under this field "invoicedetail[projectinvoicestatus]. Tried creating an DAX formula but it doesn't show the correct matrix that I want. 
Outstanding Balance =
VAR _invoicepaid =
CALCULATE(
SUM('invoicedetail'[Amount]),
'invoicedetail'[invoice.msdyn_projectinvoicestatusname]
IN { "Invoice Paid" }
)
VAR _confirmed =
CALCULATE(
SUM('invoicedetail'[Amount]),
invoicedetail[invoice.msdyn_projectinvoicestatusname]
IN {"Confirmed"}
)
RETURN
_confirmed - _invoicepaid

 

I only want to show in the matrix the Confirmed Amount, Invoice Paid Amount and the Outstanding Balance.

juhoneyighot_2-1721823562474.png

Hope you could help me ont his.

 

Thank you in advance.



1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@juhoneyighot , Try creating three mesures separately

 

DAX
Confirmed Amount =
CALCULATE(
SUM('invoicedetail'[Amount]),
'invoicedetail'[invoice.msdyn_projectinvoicestatusname] = "Confirmed"
)

 

Invoice Paid Amount =
CALCULATE(
SUM('invoicedetail'[Amount]),
'invoicedetail'[invoice.msdyn_projectinvoicestatusname] = "Invoice Paid"
)

 

Outstanding Balance =
[Confirmed Amount] - [Invoice Paid Amount]




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

3 REPLIES 3
bhanu_gautam
Super User
Super User

@juhoneyighot , Try creating three mesures separately

 

DAX
Confirmed Amount =
CALCULATE(
SUM('invoicedetail'[Amount]),
'invoicedetail'[invoice.msdyn_projectinvoicestatusname] = "Confirmed"
)

 

Invoice Paid Amount =
CALCULATE(
SUM('invoicedetail'[Amount]),
'invoicedetail'[invoice.msdyn_projectinvoicestatusname] = "Invoice Paid"
)

 

Outstanding Balance =
[Confirmed Amount] - [Invoice Paid Amount]




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






@bhanu_gautam you mean I will make 3 measures on this?

Yeah I thank this is correct. Create 3 measures. Thanks.

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.