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.
@Anonymous Hi, This error happens when data types taht you are trying to compare e.g. using "=" are different. E.g. you could have a column with value like "1" and another which is 1. Since the first one is string and the second one is number the comparison doesn't work.
Proud to be a Super User!
As mentioned already, you can use && and || to compose expressions with as many arguments as you'd like. For example,
[AY] = "NB" || [AY] = "" || [AY] = "Out Of Scope"
A couple of other things are also worth mentioning.
The IN syntax. The DAX above can also be written as:
[AY] IN { "NB", "", "Out of Scope" }
The SWITCH function. The SWITCH ( TRUE, ... ) construction is particularly powerful. See here:
https://p3adaptive.com/2015/03/the-diabolical-genius-of-switch-true/
HI: If you need to perform an AND operation on multiple expressions, you can create a series of calculations or, better, use the AND operator ( &&) to join all of them in a simpler expression.
OR logical operator is ||
Hope this helps
Hi,
You can use OR and AND operators to add more conditions for or it is || and for and it is &&
e.g. Measure 12 will return Y since one of the conditions is true
Proud to be a Super User!
Thank you! @ValtteriN
I used || and && and wrote the formula.
But I get an error "DAX comparison operations do not support comparing values of type Text with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values.".
I tried using format, still getting an error.
Can I know whats the problem?
Thank you!
Megha
@ValtteriN Can I please know what can be done for the above error?
I tried using Format, but it remains the same.
Thank you!
Megha
The most likely cause of this error is if your [Order Cycle] column is a text data type or one of the other columns references is not a text column.
@Anonymous Hi, This error happens when data types taht you are trying to compare e.g. using "=" are different. E.g. you could have a column with value like "1" and another which is 1. Since the first one is string and the second one is number the comparison doesn't work.
Proud to be a Super User!
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 |
---|---|
43 | |
21 | |
20 | |
15 | |
13 |
User | Count |
---|---|
45 | |
41 | |
39 | |
19 | |
19 |