Forum Discussion
Anonymous
7 years agoNot applicable
DATE/VALUE error with IF & OR statement
Hi everyone, I have an IF & OR statement te syntax is below and I am getting the following error "DAX comparison operations do not support comparing values of type Date with values of type Text. ...
- 7 years ago
Anonymous Please try this...
Result = IF(IFERROR(SEARCH("/",Test59StrDate[Enrollment],4),0)>0,IF(VALUE(FORMAT(Test59StrDate[Enrollment],"Short Date"))>=Test59StrDate[Outreach],"Yes","No"),"No")
PattemManohar
Community Champion
7 years agoAnonymous As per the expression you have posted - I can understand that if "DateOfStudentEnrollment" > "DateOfStudentOutReach" then "Yes" otherwise "No". But there are blank values and other text data types in "DateOfStudentEnrollment" you can use that as Date Comparision with other Date field i.e. "DateOfStudentOutReach". That's the reason for your error. You need make those fields of same datatype (in this case it will be string).
- Anonymous7 years agoNot applicableChanging the two columns to text give me incorrect vales when (student enrollment >= date of outreach, "yes", "no" and keeping them both as dates still gives me the Value/format error...:(
- PattemManohar7 years ago
Community Champion
Anonymous Please try this...
Result = IF(IFERROR(SEARCH("/",Test59StrDate[Enrollment],4),0)>0,IF(VALUE(FORMAT(Test59StrDate[Enrollment],"Short Date"))>=Test59StrDate[Outreach],"Yes","No"),"No")