cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rena
Helper III
Helper III

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 @Rena 

 

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
Super User
Super User

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

 

It works?

B.

it was not that the problem but the if clause.

VahidDM
Super User
Super User

Hi @Rena 

 

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✌️!!

 

 

Thank you. It works

Helpful resources

Announcements
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors