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
aaa12
Helper II
Helper II

Nested If/And statement with date giving an error

Hello,

I am using the following to create a new column but get an error. Can someone guide me on how to address this issue? The final output should be a text column with "Yes" or "No".

 

Logic for new column:

SLA_Missed = if(or(and(Incident_Log[Incident_Status]= "Open", today() > Incident_Log[SLA_due_date]), and(Incident_Log[Incident_Status]= "Closed", Incident_Log[Resolved_Date] > Incident_Log[SLA_due_date])), "Yes", "No")
 
Error: DAX comparison operations do not support comparing values of type Text with values of type Date. Consider using the VALUE or FORMAT function to convert one of the values.

 

Screenshot of the issue:

aaa12_0-1710033824396.png

 

All date columns are of Date type. Status column is Text type.

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, ensure that the data type of the SLA_due_date and Resolved_Date columns is of the Date data type.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, ensure that the data type of the SLA_due_date and Resolved_Date columns is of the Date data type.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

You caught me slackin'. I missed the Resolved_Date column. It wasn't the date type. I changed it and now it works. Thank you for the heads up. Accepting your answer.

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.

Top Solution Authors