Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Goal: Create DAX Measures to accuratley calculate Outstanding Amt., accurate invoice totals, and potentailly other KPIs.
Can I do what I'm trying to do here with DAX, or do I need to structure the data differenlty in PowerQuery before attempting to do this type of calculation?
Cool, I see where you're going there with the variableTable, and I got that created successfully.
However, it looks like we're missing something in the final step now?
Remove the 'Invoices and Payments'...just keep [Inv. Post. Dt.]
Thanks Brian. That got my totals right, but how can I make the yellow number = 0?
In other words, the first payment on 6/13 brought my outstanding amt. down to $47,388.73, so after applying the second payment on 6/16, the outstanding should be 0.
Try it this way...
Invoice Amount = SUMX(SUMMARIZE(Table,Table[Invoice],"Invoice Total",MAX(Table[Inv. Amt.])),[Invoice Total])
Applied Amount = SUM(Table[Applied Amount])
variableTable = SUMMARIZE(Table,Table[Invoice],Table[Invoice Date],"InvoiceAmount",[Invoice Amount],"InvoicePayment",[Applied Amount])
OutStanding Amount = SUMX(FILTER(ALLSELECTED(variableTable),Table[Invoice Date]<=MAX(Table[Invoice Date])),[InvoiceAmount]-[InvoicePayment])
Try These...
Invoice Amount = SUMX(SUMMARIZE(Table,Table[Invoice],"Invoice Total",MAX(Table[Inv. Amt.])),[Invoice Total])
Applied Amount = SUM(Table[Applied Amount])
OutStanding Amount = SUMX(SUMMARIZE(Table,Table[Invoice],Table[Invoice Date],"InvoiceAmount",[Invoice Amount],"InvoicePayment",[Applied Amount]),[InvoiceAmount]-[InvoicePayment])