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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sahameeda90
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
v-ljerr-msft
Employee
Employee

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
v-ljerr-msft
Employee
Employee

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

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

sahameeda90
New Member

Error.PNG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.