Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Curious about how to mix && and || in IF statements. Ie- IF a=value1, b=value2, c=value3 OR d=value4 OR e=value5. In other words, if these three things are true or either of these other two things are true, than 1 else 0. Are parenthesis needed in some way to make this work?
Ex., convert OR's and And's in this statement (And's are already done but may need parenthesis changes):
[Field] = IF(OR(OR(OR(RELATED('Dim - Product'[Class ID])=628 && RELATED('Dim - Product'[Subclass ID]) = 1519 && 'Fact - POS'[Config_Type] =7,RELATED('Dim - Product'[Class ID]) = 133),RELATED('Dim - Product'[Class ID])=265),RELATED('Dim - Product'[Class ID])=268)=True,1,0)
Solved! Go to Solution.
Hi @Anonymous
Have a good look at the SWITCH statement. It's really versatile.
The essence is :
Result = SWITCH ( True() , A = B && C = D , 1 A = B || C = D , 2 ---- ELSE ---- 999 )
Hi @Anonymous
Have a good look at the SWITCH statement. It's really versatile.
The essence is :
Result = SWITCH ( True() , A = B && C = D , 1 A = B || C = D , 2 ---- ELSE ---- 999 )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |