Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I am trying to concatenate 2 correspond rows in the same column. Here is my example:
I need Malignant neoplasm associated with transplanted organ on the same row to C802.
So the final result would look like this:
I tried a lag but the null rows are throwing me off. Any help will be greatly appreciated.
Solved! Go to Solution.
Right click your first column and fill down
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
and you should get something like this
Replace the highlighted text 'List.Max' with 'Text.Combine' (also throw a space in there to seperate the strings) and you get....
changes are highlighted
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.
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.
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.
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.
Thank you @JihwanKim . This is what I need. Also @Syk your solution works too. Thank you both again.
Right click your first column and fill down
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
and you should get something like this
Replace the highlighted text 'List.Max' with 'Text.Combine' (also throw a space in there to seperate the strings) and you get....
changes are highlighted
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
19 |