Forum Discussion
display multiple elements with SELECTEDVALUE
- 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)
Hello Augustin,
I think CONCATENATEX is going to do what you want. CONCATENATEX iterates over a table and concatenates a text expression evaluated for each row of the table. In particular, you can use CONCATENATEX with VALUES to concatenate distinct values from a column.
You could write a measure like this to create a comma-separated string of Nationality values.
SelectedNationalities =
CONCATENATEX (
VALUES ( data[Nationality] ),
", "
)
Is that what you were looking for?
Regards,
Owen
hi
It would be perfect but it doesn't work.
My measure (exactly the one you wrote) is not in error, and it finds the field nationality but the only value that is displayed is the Comma.
2 values selected
- v-lili6-msft7 years agoCommunity Support
hi, augustindelaf
Try this formula:
Selected PDLs= CONCATENATEX ( VALUES ( Data[Nationality] ) , [Nationality] , ",")
Best Regards,
Lin
- augustindelaf7 years agoImpactful Individual
- augustindelaf7 years agoImpactful Individual
v-lili6-msft I also need to display "Multiple Selection" IF the Concatenex values are more than 2.
Than means :
1 selection = [Selection1]
2 selections =[Selection1] ", " [Selection2]
3 sleections and more = "Multiple Selection"
how can I do that, please ?
- augustindelaf7 years agoImpactful IndividualWhat I did :Selected Nationality =IF(COUNTA( VALUES < 2;CONCATENATEX ( VALUES ( Data[Nationality] ) ; Data[Nationality] ; ", ");"Multiple Selection"))But it does not work
- Anonymous3 years agoNot applicable
This is what I needed...thank you so much!!