cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
sahameeda90 Frequent Visitor
Frequent Visitor

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

Accepted Solutions
v-ljerr-msft Super Contributor
Super Contributor

Re: Conditional If and Logical AND

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
sahameeda90 Frequent Visitor
Frequent Visitor

Re: Conditional If and Logical AND

Error.PNG

v-ljerr-msft Super Contributor
Super Contributor

Re: Conditional If and Logical AND

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

sahameeda90 Frequent Visitor
Frequent Visitor

Re: Conditional If and Logical AND

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

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 259 members 2,689 guests
Please welcome our newest community members: