Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi all
I have used the following DAX to create the ISOverdue Colum , However some of the the Tasks status Completed as highlighted below are returning incorrectly , the Not started tasks are returning correctly
How would I return the the Completed task as overdue when the update date is after the duedate ?
Thanks in advance
Adil
Solved! Go to Solution.
Hi @Anonymous ,
Please try:
IsOverdue =
var __Status = [TaskStatus]
var __DueDt = [DateDue]
var __UpdateDt = [UpdateDate]
return
IF ( __Status = "Deleted", "No", //Filter out "Deleted"
IF ( __DueDt >= TODAY(), "No", //Filter out future due dates
IF ( (__DueDt >= __UpdateDt || ISBLANK( __UpdateDt )) && __Status <> "Completed", //Open item has due date in the past and not completed
"Yes",
IF ( __Status = "Completed" && __UpdateDt > __DueDt, "Yes", "No" ) //Completed item is overdue if update date is after due date
)
)
)
This expression adds an additional condition to check if the task is completed and the update date is after the due date. If this condition is met, the task is considered overdue.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi @Anonymous ,
Please try:
IsOverdue =
var __Status = [TaskStatus]
var __DueDt = [DateDue]
var __UpdateDt = [UpdateDate]
return
IF ( __Status = "Deleted", "No", //Filter out "Deleted"
IF ( __DueDt >= TODAY(), "No", //Filter out future due dates
IF ( (__DueDt >= __UpdateDt || ISBLANK( __UpdateDt )) && __Status <> "Completed", //Open item has due date in the past and not completed
"Yes",
IF ( __Status = "Completed" && __UpdateDt > __DueDt, "Yes", "No" ) //Completed item is overdue if update date is after due date
)
)
)
This expression adds an additional condition to check if the task is completed and the update date is after the due date. If this condition is met, the task is considered overdue.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
try using switch instead of if statement and use each case separately.