Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Solved! Go to Solution.
Hi @matts29 ,
As wdx223_Daniel mentioned, you can try the following code.
CurrentIn =
IF(
AND(
ED_Performance[DepartureDttm] = BLANK(),
OR(
CONTAINSSTRING(ED_Performance[CurrentLocation], "theatre"),
OR(
CONTAINSSTRING(ED_Performance[CurrentLocation], "hall"),
CONTAINSSTRING(ED_Performance[CurrentLocation], "attic")
)
)
),
1,
0
)
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @matts29 ,
As wdx223_Daniel mentioned, you can try the following code.
CurrentIn =
IF(
AND(
ED_Performance[DepartureDttm] = BLANK(),
OR(
CONTAINSSTRING(ED_Performance[CurrentLocation], "theatre"),
OR(
CONTAINSSTRING(ED_Performance[CurrentLocation], "hall"),
CONTAINSSTRING(ED_Performance[CurrentLocation], "attic")
)
)
),
1,
0
)
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@matts29 ,
To handle multiple search strings in the same column, you can use the OR function in DAX to check for each condition. Here’s the updated formula that includes "theatre," "hall," and "attic" in your logic:
CurrentIn =
IF(
AND(
ED_Performance[DepartureDttm] = BLANK(),
OR(
CONTAINSSTRING(ED_Performance[CurrentLocation], "theatre"),
CONTAINSSTRING(ED_Performance[CurrentLocation], "hall"),
CONTAINSSTRING(ED_Performance[CurrentLocation], "attic")
)
),
1,
0
)
This way, you can search for multiple strings in the same column and maintain the desired logic. If you need to add more strings, simply include additional CONTAINSSTRING functions within the OR block.
Best regards,
Thanks so much for the help and explanation but I am getting the following error "Too many arguments were passed to the OR function. The maximum argument count for the function is 2." ?
Thanks again
OR only get two conditions
or(con1,or(con2,con3))
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
19 | |
14 | |
8 | |
7 |