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

Writing AND function with three conditions

IsReferral= IF(AND(SalesLeads[IsWebLead]=0, SalesLeads[IsPhoneLead]=0....

 

But I also need to say "and if SalesLeads[IsSelfGen]=0"

 

If all three conditions are met, then 1, else 0.

 

I'm assuming I need to connect it using && somehow.

1 ACCEPTED SOLUTION

Accepted Solutions
Solution Sage
Solution Sage

For some reason, the DAX version of AND only accepts two arguments, but you're correct about using &&. Just use that between each condition, which you can separate with parentheses for easier reading if you prefer.

 

IsReferral = IF(SalesLeads[IsWebLead]=0 
&& SalesLeade[IsPhoneLead=0
&& SalesLeads[IsSelfGen]=0, true result, false result)

 

 

You could also nest two AND functions, but that's ugly by comparison:

 

IsReferral = IF(AND(
AND(
SalesLeads[IsWebLead]=0,
SalesLeade[IsPhoneLead=0
), SalesLeads[IsSelfGen]=0
), true result, false result)

 

 

 

 

 

View solution in original post

1 REPLY 1
Solution Sage
Solution Sage

For some reason, the DAX version of AND only accepts two arguments, but you're correct about using &&. Just use that between each condition, which you can separate with parentheses for easier reading if you prefer.

 

IsReferral = IF(SalesLeads[IsWebLead]=0 
&& SalesLeade[IsPhoneLead=0
&& SalesLeads[IsSelfGen]=0, true result, false result)

 

 

You could also nest two AND functions, but that's ugly by comparison:

 

IsReferral = IF(AND(
AND(
SalesLeads[IsWebLead]=0,
SalesLeade[IsPhoneLead=0
), SalesLeads[IsSelfGen]=0
), true result, false result)

 

 

 

 

 

View solution in original post

Helpful resources

Announcements
November Update

Check it Out!

Click here to read more about the November 2020 Updates!

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform October Community Highlights

Check out the top community contributors across all of the communities

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors