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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.