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
Anonymous
Not applicable

Calculate the sum of payment amount between to dates

Hi all,

 

I am creating a open amount history report. The user wants to know the open amount at the specific date. For a selected date(selected from slicer), I want to find out the sum of the payment amount which the selected date are between invoice date and check date. Currently I linked the date from date table to invoice date in AP table, i don't think it is right. I am thinking if I should scaffold the date with all AP record, that is huge calculation. Can anyone help me out?

 

Thank you in advance!

 

babyjb123_2-1681843254010.png

 

babyjb123_0-1681842862628.png

babyjb123_3-1681843689596.png

 

 

 

1 REPLY 1
tamerj1
Super User
Super User

Hi @Anonymous 

please try

=
SUMX (
FILTER (
CALCULATETABLE ( 'Account Payable History', ALL ( 'Date' ) ),
'Account Payable History'[Invoice Date] <= MAX ( 'Date'[Date] )
&& 'Account Payable History'[Check Date] >= MAX ( 'Date'[Date] )
),
'Account Payable History'[Payment Amount]
)

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.