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! Request now

Reply
joep78
Helper III
Helper III

Calculate if date is in the past, including other filter on status

Hi all,

 

I'm trying to solve an issue, in my table I've got a date column (deadline) and a status column (Status). Now I want to add a measured column called (overdue). When field (deadline =<today)  and status IN "Ongoing", "Planned" field (overdue) should be filled with Yes.

 

I tried the following: 

Overdue = IF(Sheet1[Deadline] < TODAY() & Sheet1[Status] in {"Ongoing", "planned"}, "True","False")
 
But then I receive the following error:
DAX comparison operations do not support comparing values of type Date with values of type True/False. Consider using the VALUE or FORMAT function to convert one of the values.
 
My simple table looks as follow (field Overdue is of course not existing):
CountryPropertyTypeDescriptionYearStatusDeadlineResponsible auditorOverdue
NetherlandsOffice AAuditWELL V22022Complete31/03/2022JanssenNo
NetherlandsOffice BAuditWELL V22022Ongoing30/11/2022PietersNo
GermanyOffice CAuditWELL V22022Ongoing31/10/2022BeckersYes
GermanyOffice DAuditWELL V22022Planned31/12/2022BeckersNo

 

Hopefully anybody can help me out with this, thanks in advance for your response. 

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

You're missing an extra &

Overdue = IF(Sheet1[Deadline] < TODAY() && Sheet1[Status] in {"Ongoing", "planned"}, "True","False")

& is the text concatenation operator, && is logical and.

View solution in original post

2 REPLIES 2
joep78
Helper III
Helper III

Sorry, this was a rookie mistake, thanks very much for the solution! 

johnt75
Super User
Super User

You're missing an extra &

Overdue = IF(Sheet1[Deadline] < TODAY() && Sheet1[Status] in {"Ongoing", "planned"}, "True","False")

& is the text concatenation operator, && is logical and.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors
Top Kudoed Authors