Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Formula error: Expression.Error. The name 'IF' wasn't recognized. Make sure it's spelled correctly.

I'm using Power Query Editor to create a new column using an if statement. I used the conditional column to create the formula but now I get the below error.  How can I fix this If then statement? Se...
  • v-yuta-msft's avatar
    v-yuta-msft
    6 years ago

    Anonymous ,

     

    Modify the formula as below:

    = Table.AddColumn(#"Renamed Columns2", "Custom", each if 
    [Loading Date] > DateTime.LocalNow() then [Loading Date] else DateTime.LocalNow())

     

    Community Support Team _ Jimmy Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.