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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
russd
New Member

Calculating past late due amounts based on expected date and received date

I have a Purchase Order table that shows the date requested and the date we received it. I want to be able to go back in time and calculate the past due amounts at the end of each month. I can't find a way to attach my test pbi file so I'll put in the data here.

PO NumberRequested DateQtyUnit PriceDate received
1231/3/202332.251/3/2023
6541/8/202351.252/1/2023
1852/15/2023102.882/23/2023
3242/18/202373.53/2/2023
122333/1/2023123/4/2023
8753/15/202342.453/20/2023
4884/4/202321.635/2/2023
9884/25/202381.994/28/2023
123035/1/202360.875/15/2023

 

Example Date Table

Date Table.jpg

 

Capture1.PNG

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @russd 

Not sure if i fully get you, please try to:

1) add a calculated table lilke:

 

dates = CALENDARAUTO()

 

Note: don't join the tables.

2) plot a visual with the dates[date] column and a measure like:

 

due amount = 
VAR _date = MAX(dates[date])
RETURN
SUMX(
    FILTER(
        data,
        data[Requested Date]<=_date
            &&data[Date Received]>=_date
    ),
    data[Qty]*data[Unit Price]
)+0

 

it worked like:

FreemanZ_0-1683944290692.png

View solution in original post

3 REPLIES 3
FreemanZ
Super User
Super User

hi @russd 

Not sure if i fully get you, please try to:

1) add a calculated table lilke:

 

dates = CALENDARAUTO()

 

Note: don't join the tables.

2) plot a visual with the dates[date] column and a measure like:

 

due amount = 
VAR _date = MAX(dates[date])
RETURN
SUMX(
    FILTER(
        data,
        data[Requested Date]<=_date
            &&data[Date Received]>=_date
    ),
    data[Qty]*data[Unit Price]
)+0

 

it worked like:

FreemanZ_0-1683944290692.png

Ajendra
Resolver I
Resolver I

Hey,

 

1) First of all add calculated column in your data.

1.JPG

 

2) Then try this measure.

2.JPG

Thank you for your reply. This does not give me the output I requested. I'm in the month of May 2023, my fact table updates daily. I want to be able to see what my late total was back in Jan 2023 based on the date I expected my Purchase Orders to arrive and the date that I received them. 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.