Forum Discussion
augustindelaf
7 years agoImpactful Individual
display multiple elements with SELECTEDVALUE
Hello, I am using the DAX measure SELECTEDVALUE to display the value of a column that is filtered in a table visual. But I can't find a way to display multiple elements. For instance, if "Fr...
- 7 years ago
hi, augustindelaf
Try this formula:
Selected PDLs= CONCATENATEX ( VALUES ( Data[Nationality] ) , [Nationality] , ",")
Best Regards,
Lin
- 7 years ago
augustindelaf Please try this in your measure..
MonthSelection = VAR _Count = COUNTROWS(VALUES(_Date[Month])) VAR _Concat = CONCATENATEX(VALUES(_Date[Month]),[Month],",") RETURN IF(_Count>2,"Multiple Selection",_Concat)
v-lili6-msft
7 years agoCommunity Support
hi, augustindelaf
SELECTEDVALUE returns the value when the context for columnName has been filtered down to one distinct value only. Otherwise returns alternateResult.
So you could just need to use IN and VALUES instead of SELECTEDVALUE
For example:
(SelectedNationality IN VALUES(data[Nationality])
Best Regards,
Lin
- augustindelaf7 years agoImpactful Individual
v-lili6-msft could you please write the exact measure ?
I wrote the one you gave me but it didn't work.
Many thanks in advance.
Best regards,
Augustin