Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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 )
User | Count |
---|---|
96 | |
87 | |
78 | |
72 | |
68 |
User | Count |
---|---|
113 | |
105 | |
84 | |
65 | |
64 |