Forum Discussion
Anonymous
6 years agoNot applicable
How to return multiple values separated by commas (DAX)
Hi, everyone. I suppose that it is noobie question - but I can't find an answer. Pls, help. I have 2 tables and need to create a new one The first table contains Client ID and Source The second ...
- 6 years ago
Hi Anonymous ,
You can create the following table:
Table = ADDCOLUMNS ( SUMMARIZE ( FILTER ( Sold; Sold[Sold] = "YES" ); Sold[ClientID] ); "Source"; CONCATENATEX ( RELATEDTABLE ( Source ); Source[Source]; ", " ) )If you want a measure you should use:
Measure = CONCATENATEX(Source;Source[Source]; ", ")Then just filter out the Sold to yes on the filter of the visual.
dmatliak
4 years agoFrequent Visitor
Hello I have a question related to this topic. I have a table and measure created like this.
But what I want is to have only 1 value in MCC_LIST. Just filter distinct values, no repetition.
Thank you for help, Dusan
- MFelix4 years agoSuper User
HI dmatliak ,
Instead of refering to the all table refer only to the columns you need that will create a summarize with distinct values:
MCCList = IF ( HASONEVALUE ( LOC[CUSTID] ), VAR mcc_list = VALUES ( LOC[CUSTID] ) RETURN CONCATENATEX ( FILTER ( ALL ( LOC[CUSTID], LOC[MCC] ), LOC[CUSTID] IN mcc_list ), LOC[MCC], "," ), BLANK () )