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
bhmiller89
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
KGrice
Memorable Member
Memorable Member

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
KGrice
Memorable Member
Memorable Member

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)

 

 

 

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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 Kudoed Authors