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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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