Forum Discussion
mraka9
4 years agoHelper III
Linking related items within the same table-Power Query
I need help with Power Query. I have a table with columns: A, B and C Column A and C contain identical items to be linked. I want column C to check where everything is in column A and show concate...
- 4 years ago
Hey mraka9 ,
here you will find the pbix file: https://tommartens-my.sharepoint.com/:u:/g/personal/tom_minceddata_com/EblF6V1lDU9Juds8936QHn4Bv2SHqj2_a1QhalXlXJyVqw?e=5kWRbf
Regards,
Tom
TomMartens
4 years agoSuper User
Hey mraka9 ,
to create this
I created an inline function using the advanced editor, the code below added the custom column "Custom", which holds the result, the combinedString:
...
#"Added Custom" =
Table.AddColumn(#"Changed Type", "Custom",
( row ) =>
let
filtervalue = row[C],
combinedString =
Text.Combine(
List.Transform(
Table.SelectRows( #"Changed Type" , each [C] = filtervalue )[B]
, each Number.ToText( _ )
)
, ";")
in
combinedString
)
in
#"Added Custom"
Hopefully, this provides what you are looking for. If not, consider creating a pbix that contains sample data, upload the pbix to onedrive, googledrive, or dropbox and share the link. If you are using Excel to create the sample data share the xlsx as well.
Regards,
Tom
- mraka94 years agoHelper III
Unfortunately, the result is not correct. Column D should contain the items as shown in the example.
Thanks anyway!