Forum Discussion
DAX CONTAINS() Help with weird data I have
- Anonymous8 years ago
HI Tumeski,
If you want do some contains related check, I'd like to suggest you use IN keyword with ALLSELECTED function.
Sample:
Billed = IF ( SELECTEDVALUE ( 'Orders'[ID] ) IN ALLSELECTED ( 'Bills'[OrderNum] ); TRUE (); FALSE () )BTW, current dax functions not support regular expression.
Regards,
Xiaoxin Sheng
HI Tumeski,
If you want do some contains related check, I'd like to suggest you use IN keyword with ALLSELECTED function.
Sample:
Billed =
IF (
SELECTEDVALUE ( 'Orders'[ID] ) IN ALLSELECTED ( 'Bills'[OrderNum] );
TRUE ();
FALSE ()
)
BTW, current dax functions not support regular expression.
Regards,
Xiaoxin Sheng
- Tumeski8 years agoNew Member
Hey Anonymous,
Thank you for your reply. This DAX seems to do the trick. In C# Contains() understands to find it inside the string, but yeah I quess only IN is available to do this in DAX world.
- Anonymous8 years agoNot applicable
HI Tumeski,
>>This DAX seems to do the trick. In C# Contains() understands to find it inside the string, but yeah I quess only IN is available to do this in DAX world.
For search text itself, I'd like to suggest you use search and find function.
DAX Fridays! #30: SEARCH vs FIND
Regards,
Xiaoxin Sheng