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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
DaveHepler
Frequent Visitor

Concatenated list from another table, with filter, and only distinct.

I feel like I'm close but still losing here.

 

Sample data

 

I have a table like this, call it Project

ProjectNameMany other columns
1A 
2B 
3C 

 

And another like this, call it IDs

ProjectID
1X
1Y
2X
3Z
3

Z

3

Y

 

Desired Ouput, new column in Project table.

ProjectNameDesired new Column
1AX,Y
2BX
3CY,Z

 

Current Dax

Site_IDS =
CONCATENATEX(DISTINCT(FILTER(IDs,IDs[PROJECT]=PROJECT[PROJECT])),IDs[ID],", ")
 
This works but instead of my desired output I get 
ProjectNameDesired new Column
1AX,Y
2BX
3CY,Z,Z

 

The DISTINCT() doesnt appear to be doing anything at all.  The output is the same with or without it.   I feel like I'm missing something trivial.  I want only a list of distinct values from the IDs table matching the project number in the project table.   Any assistance would be greatly appreciated.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @DaveHepler ,

Here are the steps you can follow๏ผš

1. Create calculated table.

Table3 =
SUMMARIZE(
    'Table2',
    'Table2'[Project],'Table2'[ID])

2. Create calculated column.

Table3๏ผš

Column =
CONCATENATEX(
    FILTER(ALL(Table3),
    'Table3'[Project]=EARLIER('Table3'[Project])), [ID])

vyangliumsft_0-1657247135667.png

Table1๏ผš

Desired new Column =
CALCULATE(
    MAX('Table3'[Column]),
    FILTER(ALL('Table3'),
    'Table3'[Project]='Table1'[Project]))

3. Result:

vyangliumsft_1-1657247135669.png

If you need pbix, please click here.

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @DaveHepler 

Establishe a relationship between the teo table using Project columns then create a measure

Site_IDS =
CONCATENATEX(VALUES(IDs[ID]),IDs[ID],", ")
Anonymous
Not applicable

Hi  @DaveHepler ,

Here are the steps you can follow๏ผš

1. Create calculated table.

Table3 =
SUMMARIZE(
    'Table2',
    'Table2'[Project],'Table2'[ID])

2. Create calculated column.

Table3๏ผš

Column =
CONCATENATEX(
    FILTER(ALL(Table3),
    'Table3'[Project]=EARLIER('Table3'[Project])), [ID])

vyangliumsft_0-1657247135667.png

Table1๏ผš

Desired new Column =
CALCULATE(
    MAX('Table3'[Column]),
    FILTER(ALL('Table3'),
    'Table3'[Project]='Table1'[Project]))

3. Result:

vyangliumsft_1-1657247135669.png

If you need pbix, please click here.

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

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!

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.

Users online (26)