cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Conditional If and Logical AND

Error.PNG

I am using a very simple conditional if and logical AND statement to create a calculated field. It says there are no syntax errors but when I apply the formula it gives this error

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

 

Please Help!!

1 ACCEPTED SOLUTION
Microsoft
Microsoft

Hi @sahameeda90,

 

All functions in Power Query, whether text, logic or anything else, are case sensitive. You should use if...then...else instead. Here a good article about if function in Power Query for your reference.

 

In addition, your current formula with IF and logical AND statement should work when you use it to add a calculate column under Modeling tab in Power BI Desktop. Smiley Happy

 

c0.PNG

 

Regards

View solution in original post

3 REPLIES 3
Microsoft
Microsoft

Hi @sahameeda90,

 

All functions in Power Query, whether text, logic or anything else, are case sensitive. You should use if...then...else instead. Here a good article about if function in Power Query for your reference.

 

In addition, your current formula with IF and logical AND statement should work when you use it to add a calculate column under Modeling tab in Power BI Desktop. Smiley Happy

 

c0.PNG

 

Regards

View solution in original post

THank you @v-ljerr-msft.  They work with lower case and a little change with syntax. I appreciate your help.

New Member

Error.PNG

Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors