Forum Discussion
Peter_23
1 year agoAdvocate V
IN operator
Hi there, I have a dude with this expression: IN , e.g. how many values its accepting? It's similar to SQL: You can specify up to 1000 expressions in expression_list. One example: EVALU...
- 1 year ago
Hey Peter_23
I initially confused the concepts 😅.
EXISTSis a logical operator in SQL, used to check the existence of rows in a subquery. However, there is no directEXISTSfunction in DAX.In DAX, similar logic can be achieved by using functions like
CALCULATEcombined withCOUNTROWSto check if specific conditions are met.
Here’s a cleaner version of your query:EVALUATE
VAR MatchCheck =
CALCULATE(
COUNTROWS(USER),
USER[ID] = FACT[ID_USER],
USER[COUNTRY] = "US"
)RETURN
SWITCH(
TRUE(),
MatchCheck > 0, TRUE(),
FALSE()
)