Forum Discussion

Stuznet's avatar
Stuznet
Icon for Helper V rankHelper V
7 years ago
Solved

Rewrite 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 getting different count

IFERROR(IF(Table1[Date1] - [Date2] >= -1, “Yes”,
IF([Date2] = BLANK(), “No”,”No”)),”No”)

Can some please help?

Thanks much!
  • Anonymous's avatar
    Anonymous
    7 years ago

    Perhaps

     

    IF(  Table1[Date1] - Table1[Date2] < -1 || ISBLANK(Table1[Date2]), "No", "Yes")

4 Replies