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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
savanahmk
New Member

confuse on how to format IF statement with both an && and "or".

Hey, quick question: I'm making an IF statement with both an && and "or". The logic is IF Role = "CMPM" and Task = "Scheduling" or "Training". Is it written out like IF(Role = "CMPM" && Task = "Scheduling" | | Task = "Training", )? Or like IF(Role = "CMPM" && (Task = "Training" | | "Scheduling"), )? I'm getting a bit confused on how to format it.

1 ACCEPTED SOLUTION
Rayshin
Memorable Member
Memorable Member

@savanahmk  You will need to include parenthesis e.g., IF ( (x = x) && (y = y || y = y )) The set around x = x isn't required, but when doing statements like this is better.

View solution in original post

1 REPLY 1
Rayshin
Memorable Member
Memorable Member

@savanahmk  You will need to include parenthesis e.g., IF ( (x = x) && (y = y || y = y )) The set around x = x isn't required, but when doing statements like this is better.

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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