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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
racheljeska
Regular 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
Impactful Individual
Impactful Individual

@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
Impactful Individual
Impactful Individual

@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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.