Forum Discussion

Beyondforce's avatar
Beyondforce
Helper I
9 years ago
Solved

IF statment doesn't work!

Hey Guys,

 

I'm trying to add a new column and I'm also adding this formula, but it's not working! What's wrong with it?

=IF([LateStart]= 0, && ([LateEnd] = 0),0))

 

Thanks.

Ben.

16 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Beyondforce Try the following. I assume you want the column to return 0 if both LateEnd and/or LateStart = 0

     

    Column = IF(AND([LateStart]= 0, [LateEnd] = 0),0)

    I'm also assuming that these are columns. Ideally it should read to include the table name, not using the table name implies a measure only:

     

    Column = IF(AND('Table1'[LateStart]= 0, 'Table1'[LateEnd] = 0),0)
    • Beyondforce's avatar
      Beyondforce
      Helper I

      Hi Anonymous,

       

      Thanks for your replay. I have tried both option, but I kepp getting the same error: "Expression.Error: The name 'IF' wasn't recognized.  Make sure it's spelled correctly."