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.
IF( OR(Table[Column] = "A", OR(Table[Column] ="B",
Table[Column]="C")), "These are some letters", IF( OR(Table[Column]="Bill", OR(Table[Column]="Mary", OR(Table[Column]="Joe", OR(Table[Column]="Jeff",
Table[Column]="Tony")))),
"These are names","Other"
)
It just seems kinda crazy that I have to say Table[Column] every time, maybe "OR" isn't the best option. Is there a better way to write this?
Solved! Go to Solution.
Hi @Anonymous,
In dax there isn't an equivalent formula to the IN of SQL, please check this article with the explanation and how to do it in different number of ways.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português@Anonymous
Hi, you can reduce the code using IN {}
Result = SWITCH ( TRUE (), Table1[Column] IN { "A", "B", "C" }, "These are some letters", Table1[Column] IN { "Bill", "Mary", "Joe", "Jeff", "Tony" }, "These are names", "Other" )
Regards
Victor
Lima - Peru
Hi @Anonymous,
In dax there isn't an equivalent formula to the IN of SQL, please check this article with the explanation and how to do it in different number of ways.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCovering 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 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |