cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Microsoft v-ljerr-msft
Microsoft

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

Microsoft v-ljerr-msft
Microsoft

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
Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors