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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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