Forum Discussion

loganwol's avatar
loganwol
Microsoft Employee
9 years ago
Solved

Concatenatex with Distinct column values

Hi,

I am summarizing data from one table into another. Part of the data in the original table is a column of type text which I generate a comma delimited summary string.

 

Issues =  
    var ft = FILTER(RELATEDTABLE(Data), 
                  [ID] = Data[ID] && Data[Result] <> "Pass" && 
                  Not ISBLANK(TRIM(Data[Issue]))) 
    var issuessummary = CONCATENATEX(ft, Data[Issue], ",")
return 
     issuessummary


This works perfectly but I realized that the return values can be duplicate, so a result value string for issuessummary could equal "ABC", "DEF", "ABC", "xyz". I would like to remove the duplicate in the return string to represent "ABC", "DEF", "xyz".


Is there a way to accomplish that?

Regards,
Sunil

6 Replies

  • bugs84's avatar
    bugs84
    Frequent Visitor

    Hi all,

    I'm looking for the same...

     

    ListProductTypes = CONCATENATEX(Table;Table[ProductType];", ")

     

    how can I get only distinct ProductType values?

      • AriSultani's avatar
        AriSultani
        Regular Visitor

        Unfortunately, it does not work for me; I use the following code, and works perfectly.

        CONCATENATEX(DISTINCT(Table[The Column]),Table[The Column],", ")