Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Ayoeri
Frequent Visitor

Trying to combine CONCATENATEX with DISTINCT

I've got below table:

Ayoeri_1-1718908647817.png


For each project I'm trying to concatenate a list of all colors in that project. So:

Ayoeri_5-1718909280201.png

 

Or in short:

Ayoeri_2-1718908779135.png

 

I used below function CONCATENATEX (FILTER ('Table', 'Table'[Project] = EARLIER ('Table'[Project])), 'Table'[Color], ", "). This does give me the list of all colors in the project but it shows them all:

Ayoeri_4-1718909099385.png

 

In order to get to my desired result I want to take the duplicated colors out of the concatenated list. I have tried to work with the DISTINCT function as below but this did not give me the desired output.
CONCATENATEX (DISTINCT(FILTER ('Table', 'Table'[Project] = EARLIER ('Table'[Project]))), 'Table'[Color], ", ").

Any idea how I could get the duplicates out of this CONCATENATEX list?

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a new column.

 

Jihwan_Kim_0-1718910453816.png

 

 

expected result CC =
CONCATENATEX (
    SUMMARIZE (
        FILTER ( 'Table', 'Table'[Project] = EARLIER ( 'Table'[Project] ) ),
        'Table'[Colors]
    ),
    'Table'[Colors],
    ", "
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a new column.

 

Jihwan_Kim_0-1718910453816.png

 

 

expected result CC =
CONCATENATEX (
    SUMMARIZE (
        FILTER ( 'Table', 'Table'[Project] = EARLIER ( 'Table'[Project] ) ),
        'Table'[Colors]
    ),
    'Table'[Colors],
    ", "
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thanks, that worked! I didn't consider the summarize function over the distinct.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.