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! Learn more

Reply
racheljeska
Frequent Visitor

Number of Days Overdue

Column [Status] has either Completed, Overdue, or Coming Due

 

I want to create a new column named Days Overdue that only uses Overdue from the Status Column

 

If it is Overdue, then count the days between TODAY and the [Due Date]

If Completed or Coming Due, leave it blank. 

 

Thank you! 

2 ACCEPTED SOLUTIONS
AnalyticPulse
Super User
Super User

@racheljeska 
add below calculated column to achieve this:

Days_Overdue = IF( [Status] = "Overdue", MAX(0, DATEDIFF(TODAY(), [Due Date], DAY)), BLANK() )

 

Learn Power BI free:

https://analyticpulse.blogspot.com

Learn Powerbi

Dax functions

Powerbi Visualisation

View solution in original post

VahidDM
Super User
Super User

Hi @racheljeska 

 

Try this:

DaysOverdue =
IF ( [Status] = "Overdue", DATEDIFF ( TODAY (), [Due Date], DAY ) )

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

LinkedIn | Twitter | Blog | YouTube 

View solution in original post

5 REPLIES 5
VahidDM
Super User
Super User

Hi @racheljeska 

 

Try this:

DaysOverdue =
IF ( [Status] = "Overdue", DATEDIFF ( TODAY (), [Due Date], DAY ) )

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

LinkedIn | Twitter | Blog | YouTube 

AnalyticPulse
Super User
Super User

@racheljeska 
add below calculated column to achieve this:

Days_Overdue = IF( [Status] = "Overdue", MAX(0, DATEDIFF(TODAY(), [Due Date], DAY)), BLANK() )

 

Learn Power BI free:

https://analyticpulse.blogspot.com

Learn Powerbi

Dax functions

Powerbi Visualisation

The Due dates are in the past

racheljeska_0-1715799237160.png

 

But that new column is saying 0 for Over due days 

racheljeska_1-1715799287677.png

 

I took out 

MAX(0,

And I think it works now. Thank you! 

@racheljeska  You're welcome!

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.