Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
EashwarBalaji
Resolver I
Resolver I

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

I have to create a custom column "Lift/Escalator" which has the value "Lift" or "Escalator" based on another column, "lift_list".

 

That is If [lift_list] is not null, then Lift/Escalator should have "Lift", otherwise "Escalator"

I tried the following two formulae

1. = Table.AddColumn(#"Renamed Columns", "Lift/Escalator", each IF( ISNOTBLANK([lift_list]) , "Lift" , "Escalator" ))

2. = Table.AddColumn(#"Renamed Columns", "Lift/Escalator", each IF [lift_list] <> null , "Lift" , "Escalator" )

 

I got this error for both:

EashwarBalaji_1-1678280845522.png

 

Can you please help me solving this. Thanks in advance!

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Power Query is case sensitive, use the second version of your code but use if instead of IF

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

Power Query is case sensitive, use the second version of your code but use if instead of IF

Thanks. It worked

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.