Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

If Condition

Hi All,

I have one calculated column as 'Program Status'. my expression for that column is, if i have value in my completion_date column, then it should display "Certified" .. else it should display "Notcertified" .

 

The Problem is "I have blank values as well as spaces in the completion_date .. for spaces also it is taking Certified.

Below is my expression:

ProgramStatus = if(AND(ISBLANK(Data[COMPLETIONDATE]), Data[COMPLETIONDATE] = ""),"NotCompleted","Completed")

 

 

 

 

 

 Here, it shows completed for the one it has date and it shows completed if dont have date also.

 

Thanks,

Sai

  • Hi Anonymous 

     

    Try replacing the AND with OR.

     

    Hope this helps

     

    Thanks,

    George

  • Hi Anonymous 

     

    You can convert the data type to date, this should get rid of all the spaces and convert this to blanks, or you can use the TRIM function on your date field.

     

    Using OR instead of AND should work as well.

     

    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    LinkedIn


      

     

2 Replies

  • judspud's avatar
    judspud
    Solution Supplier

    Hi Anonymous 

     

    Try replacing the AND with OR.

     

    Hope this helps

     

    Thanks,

    George

  • Mariusz's avatar
    Mariusz
    Community Champion

    Hi Anonymous 

     

    You can convert the data type to date, this should get rid of all the spaces and convert this to blanks, or you can use the TRIM function on your date field.

     

    Using OR instead of AND should work as well.

     

    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    LinkedIn