Forum Discussion
aaa12
2 years agoHelper 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:
All date columns are of Date type. Status column is Text type.
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.
3 Replies
- Ashish_MathurSuper 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.
- aaa12Helper II
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.
- Ashish_MathurSuper User
You are welcome.