Forum Discussion
Search is not behaving
- 6 years ago
You can try this measure expression to return a 1 when one of the manager columns matches your slicer value. I assume your slicer values are in a disconnected table. Replace Slicer and Table with your actual table names.
IsMatch = VAR slicer = SELECTEDVALUE ( Slicer[Manager] ) RETURN IF ( NOT ( ISBLANK ( COUNTROWS ( FILTER ( ALLSELECTED ( Table ), Table[Manager1] = slicer || Table[Manager2] = slicer ) ) ) ), 1 )If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
- 6 years ago
Hi Anonymous ,
Search() function is used to return the number of the starting position of the first text string from the first character of the second text string. It will not be applied in this issue.
You can try to create a measure like this:
Result = var _managers = SELECTEDVALUE(Managers[Managers]) var _manager1 = SELECTEDVALUE('Table'[manager1]) var _manager2 = SELECTEDVALUE('Table'[manager2]) return IF( HASONEFILTER(Managers[Managers]), IF( _managers = _manager1 || _managers = _manager2, "yes", "no" ), "error" )before slicerafter slicer
Attached a sample file in the below, hopes to help you.
Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
Search() function is used to return the number of the starting position of the first text string from the first character of the second text string. It will not be applied in this issue.
You can try to create a measure like this:
Result =
var _managers = SELECTEDVALUE(Managers[Managers])
var _manager1 = SELECTEDVALUE('Table'[manager1])
var _manager2 = SELECTEDVALUE('Table'[manager2])
return
IF(
HASONEFILTER(Managers[Managers]),
IF(
_managers = _manager1 || _managers = _manager2,
"yes",
"no"
),
"error"
)
before slicerafter slicer
Attached a sample file in the below, hopes to help you.
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.