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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
PetrovBI
New Member

Dynamic overdue status based on date selection not working properly

Hi,

 

I have account receivables consisting of invoices, their close/pay date (can be blank), due date (not blank), and a transaction date among other fields. 

I have already calculated a static overdue/not overdue status field based on today's date. However, I need to create a dynamic overdue/not overdue status measure because I want to look at the status of an invoice based on the last date of the date period that I select/filter on.

 

I am using a date period slicer (between). 

 

I did manage to fetch the last date of the period with

"Period End-Date = CALCULATE(MAX(Calendar[Date]), ALLSELECTED(Calendar[Date]))"

 

Then I tried creating the dynamic status field as following: 

Dynamic Status = IF(DATEDIFF([Period End-Date], MAX(AccountReceivables[DueDate]), DAY) >= 0, "Not Overdue", "Overdue")

 

It worked for the majority of rows, but some rows receive the wrong status, "Not Overdue" even if the due date is behind the period end-date, for instance due date - 30/12/2022 vs period end-date - 31/12/2022. 

 

PetrovBI_0-1675881815197.png

 

What could I be doing wrong? Sadly, I cannot share the data.

 

Thank you in advance! 

 

Best regards

 

 

 

0 REPLIES 0

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.