Forum Discussion

INJAINP's avatar
INJAINP
Frequent Visitor
7 years ago
Solved

blank value in if else

Hello Folks,   I have below scenario where if date1 is gretaer than date2 then it should display YES And otheriwse it should be  NO.   I want if Date 2 is blank then NO should be populated but it...
  • SivaMani's avatar
    7 years ago

    INJAINP,

     

    Try the below DAX code,

     

    IF(ISBLANK(date2),"NO", IF(date1 > date2, "YES","NO"))

     

    Thanks,

    Siva

  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi INJAINP

     

    Write dax in this way 

    Selection = IF(ISBLANK(Table1[Date2]),"No",
               IF(Table1[Date1]>Test2[Date2],"Yes","No"))

    Hope this will help you!!!

  • INJAINP's avatar
    INJAINP
    7 years ago

    Hello Angad,

     

    Thanks for your input.

     

    The issue got resolved as I was just doing a minor mistake.

     

    Thanks

    Priyanka