In DAX, how do you return a a set of matching rows and concatenate one of the columns?

alex1alex

Board Regular
Joined
Sep 12, 2014
Messages
57
I want to do something like
=related(othertable[aColumn])
but where there are multiple matching rows and therefore, you concatenate all of the aColumn values that match the rows.
something like the below but which works :)
=concatenate( TO LIST ( values(filter(othertable,othertable[bColumn]=[value in this table]))))
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
I think there are two problems here:
1) There is no ConcatenateX function, which would totally rule.
2) I'm skeptical that RELATED() can be doing what you are saying? The relationship is many to 1... you are on the many side (the fact/data table), it should only match exactly 1 row in the Lookup table?

If you are going the OTHER way (from Lookup Table to Fact Table), it would be RELATEDTABLE(othertable), but then... you have to aggregate that, and again, there is no ConcatX :(
 
Upvote 0
Yeah, I agree that there's no obvious way to do this.
Agree about the RELATED not working because of the 1:many.
But the filter combined with, say, countrow will do a 1:many match and return a table (which the countrow then...er...counts :). There should be a way to say, filter, then return the table...then take one of the columns and convert to a list. I'm a bit of a newbie when it comes to DAX though.
Thanks for the response. At least if rules out any obvious answers :)
 
Upvote 0

Forum statistics

Threads
1,214,415
Messages
6,119,382
Members
448,889
Latest member
TS_711

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top