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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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