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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

function if and language M

Hello,

 

does it exist in Language M:

the if + and ?

 

thanks

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

If +else if + then should be the same as if and. You can create a Conditional column in power query by adding multi rules to check the M code.

3.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

4 REPLIES 4
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

If +else if + then should be the same as if and. You can create a Conditional column in power query by adding multi rules to check the M code.

3.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Yes they both exist.

 

If 

https://docs.microsoft.com/en-us/dax/if-function-dax 

 

And (which you could use a & or && for depending on situation)

 

https://docs.microsoft.com/en-us/dax/and-function-dax

@Anonymous ,

I believe he was asking after the M language, not DAX.

Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Nathaniel_C
Community Champion
Community Champion

@Anonymous ,

Yes it does! What I will usually do, is use the Add Conditional Column and enter something close, and then look at the syntax in the formula window.  Combine that with google M language and what ever connectors I am researching.

 

Operators Try this for operators.

 

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel

 

 

 

if and and.PNG

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors