Forum Discussion
Stuznet
Helper V
7 years agoRewrite IF function
Hi all, I’m currently struggling to rewrite this excel formula to DAX. Excel formula IFERROR( IF(A2-B2 >= -1, “Yes”, IF ( B2 = “ “, “No”, “No”)), “No”) I’ve tried to write in DAX, but I’m gettin...
- Anonymous7 years ago
Perhaps
IF( Table1[Date1] - Table1[Date2] < -1 || ISBLANK(Table1[Date2]), "No", "Yes")
themistoklis
Community Champion
7 years ago
Are you sure it is blank and not just an empty cell?
Maybe the following?
IFERROR(IF((Table1[Date1] - Table1[Date2]) >= -1, "Yes", IF(OR(Table1[Date2] = BLANK(), Table1[Date2]="", LEN(Table1[Date2]) = 0), "No","No")),"No")