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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
ranis1227
Helper I
Helper I

DAX to Concatenate Correspond Rows?

Hello,

 

I am trying to concatenate 2 correspond rows  in the same column.   Here is my example:

 

ranis1227_1-1661780528894.png

I need Malignant neoplasm associated with transplanted organ on the same row to C802.  

 

So the final result would look like this:

ranis1227_2-1661780765463.png

 

I tried a lag but the null rows are throwing me off.  Any help will be greatly appreciated.  

 

 

 

2 ACCEPTED SOLUTIONS
Syk
Super User
Super User

Right click your first column and fill down

Syk_0-1661783045779.png


This will give your descriptions the same ID.

Then right click the same row and select group by and set it to MAX of the description

Syk_1-1661783129621.png

and you should get something like this

Syk_3-1661783238733.png

Replace the highlighted text 'List.Max' with 'Text.Combine' (also throw a space in there to seperate the strings) and you get....

Syk_5-1661783356831.png

changes are highlighted

 

View solution in original post

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but if you can go into Power Query Editor, try using FILLDOWN function in order to make null value same as the above value.

https://docs.microsoft.com/en-us/power-query/fill-values-column

 

And then try creating a new table by writing a DAX formula something like below.

 

Please check the below picture and the attached pbix file.

 

 

Picture1.png

 

 

New Table =
ADDCOLUMNS (
    VALUES ( Data[Column1] ),
    "@NewColumn", CALCULATE ( CONCATENATEX ( Data, Data[Column2], " " ) )
)

 

 

 


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

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but if you can go into Power Query Editor, try using FILLDOWN function in order to make null value same as the above value.

https://docs.microsoft.com/en-us/power-query/fill-values-column

 

And then try creating a new table by writing a DAX formula something like below.

 

Please check the below picture and the attached pbix file.

 

 

Picture1.png

 

 

New Table =
ADDCOLUMNS (
    VALUES ( Data[Column1] ),
    "@NewColumn", CALCULATE ( CONCATENATEX ( Data, Data[Column2], " " ) )
)

 

 

 


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.

Thank you @JihwanKim . This is what I need.  Also @Syk  your solution works too.  Thank you both again.  

Syk
Super User
Super User

Right click your first column and fill down

Syk_0-1661783045779.png


This will give your descriptions the same ID.

Then right click the same row and select group by and set it to MAX of the description

Syk_1-1661783129621.png

and you should get something like this

Syk_3-1661783238733.png

Replace the highlighted text 'List.Max' with 'Text.Combine' (also throw a space in there to seperate the strings) and you get....

Syk_5-1661783356831.png

changes are highlighted

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.