Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I have the code below that is returning the incorrect result. I believe it is the multiple 'or' conditions afterwards. Is there a solution to fix this so the result would be if the Line=ele AND ship=VA AND Category is any of the following then the result is cust whse. Or at least a better understanding of how this would be enterpreted?
if [Line]="ELE" and [Ship]="VA" and [Category]=101 or [Category]=102 or [Category]=103 or [Category]=104 or [Category]=105 or [Category]=106 or [Category]=107 or [Category]=108 or [Category]=109 or [Category]=110
then [Cust]
Thanks!
Solved! Go to Solution.
if ([Line]="ELE" and [Ship]="VA") and ([Category]=101 or [Category]=102 or [Category]=103 or [Category]=104 or [Category]=105 or [Category]=106 or [Category]=107 or [Category]=108 or [Category]=109 or [Category]=110)
then [Cust] else null
--Nate
if ([Line]="ELE" and [Ship]="VA") and ([Category]=101 or [Category]=102 or [Category]=103 or [Category]=104 or [Category]=105 or [Category]=106 or [Category]=107 or [Category]=108 or [Category]=109 or [Category]=110)
then [Cust] else null
--Nate
Parentheses, of course! Thanks!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.