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
Anonymous
Not applicable

DAX Error using the "&&" or the "and"

I am running into an issue with the formula listed below. I tried the "&&" instead of the "and"  but i have the same results (error) when validating my formula.

Can you please help me manage this?

 

Rena_0-1632225447320.png

Rena_1-1632225505778.png

 

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @Anonymous 

 

This is MCODE in Power Query, and it's not Dax to use &&.

 

https://docs.microsoft.com/en-us/powerquery-m/m-spec-conditionals

 

Don't use else for all IF statements; write IF then else IF then else IF then else ,,,

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos✌️!!

 

 

View solution in original post

4 REPLIES 4
BeaBF
Impactful Individual
Impactful Individual

@Anonymous In the Power Query language M you have to use only one ampersand -> &

 

It works?

B.

Anonymous
Not applicable

it was not that the problem but the if clause.

VahidDM
Super User
Super User

Hi @Anonymous 

 

This is MCODE in Power Query, and it's not Dax to use &&.

 

https://docs.microsoft.com/en-us/powerquery-m/m-spec-conditionals

 

Don't use else for all IF statements; write IF then else IF then else IF then else ,,,

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos✌️!!

 

 

Anonymous
Not applicable

Thank you. It works

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.

Top Solution Authors