Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

0 for cell without date

Hi I am new to PowerBI and just joined this community so hi everyone!!

 

I'm looking to create a column which has 1 in if there is a date in the previous column and 0 if the cell is empty (ie no date). Is there a formula to do this?

 

Many thanks,

 

Vicky

  • Hi Anonymous ,

     

    You can new a calculated column with a formula similar to below:

    New Column =
    IF ( TableName[PreviousColumnName] <> BLANK (), 1, 0 )

    Best regards,

    Yuliana Gu

1 Reply

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Microsoft Employee

    Hi Anonymous ,

     

    You can new a calculated column with a formula similar to below:

    New Column =
    IF ( TableName[PreviousColumnName] <> BLANK (), 1, 0 )

    Best regards,

    Yuliana Gu