Forum Discussion
Multiple Select option
- Anonymous2 years ago
Hi ShivGC ,
Please try to create a measure with below dax formula:
Measure = VAR _a = SELECTEDVALUE ( 'Client Information'[Client ] ) VAR tmp = SELECTCOLUMNS ( Client, "Client Name", [Client] ) VAR _str = CONCATENATEX ( tmp, [Client Name], "," ) VAR _result = IF ( CONTAINSSTRING ( _str, _a ), "#006D9E", "#A6E2EF" ) RETURN _resultAdd a scatter visual with Client Information table, and set the markers color
 
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - 2 years ago
IsTable1InTable2 = IF( COUNTROWS( FILTER( 'Table1', 'Table1'[ColumnName] IN VALUES('Table2'[ColumnName]) ) ) > 0, TRUE, FALSE )
Here is a code that worked for me 🙂
Hi ShivGC ,
Please try to create a measure with below dax formula:
Measure =
VAR _a =
SELECTEDVALUE ( 'Client Information'[Client ] )
VAR tmp =
SELECTCOLUMNS ( Client, "Client Name", [Client] )
VAR _str =
CONCATENATEX ( tmp, [Client Name], "," )
VAR _result =
IF ( CONTAINSSTRING ( _str, _a ), "#006D9E", "#A6E2EF" )
RETURN
_result
Add a scatter visual with Client Information table, and set the markers color
 
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Do you know why the Selected value function does not work for multiple select?
I wanted to use an alternative of the selected value so I could use it in the calculate function too.
I do not undertsand why Selectedvalue will not work when I select more than one value?
- lbendlin2 years agoSuper User
Do you know why the Selected value function does not work for multiple select?For that you need to use VALUES()
- Anonymous2 years agoNot applicable
Hi ShivGC ,
For Selectedvalue() function, it return the value when the context for columnName has been filtered down to one distinct value only. Otherwise returns alternateResult.
When you select more than one value in slicer, it will return blank when not set the second parameter.
For more details, you can read related document: SELECTEDVALUE function - DAX | Microsoft Learn
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.