Forum Discussion
vc25
6 months agoHelper I
Dynamically merge specific columns without null and output as text
Hello, in power query, I want to merge specific columns that start with "cdp" Some columns are null values which I do not want to show up in my final output. For example, I have 4 columns "cdp1" "cdp...
- 6 months ago
Hi vc25 pls remove the highlighted lines
Since Changed Type 3 already converts fish columns to text, you can just add the merge step after that and it will show values instead of table.
AddMergedLabels = Table.AddColumn( #"Changed Type3", "merge", each Text.Combine( List.RemoveNulls( List.Transform( List.Select( Table.ColumnNames(#"Changed Type3"), each Text.StartsWith(_, "fish") ), (c) => Record.Field(_, c) ) ), ";" ), type text ) in AddMergedLabels
techies
6 months agoSuper User
Hi vc25 pls remove the highlighted lines
Since Changed Type 3 already converts fish columns to text, you can just add the merge step after that and it will show values instead of table.
AddMergedLabels =
Table.AddColumn(
#"Changed Type3",
"merge",
each
Text.Combine(
List.RemoveNulls(
List.Transform(
List.Select(
Table.ColumnNames(#"Changed Type3"),
each Text.StartsWith(_, "fish")
),
(c) => Record.Field(_, c)
)
),
";"
),
type text
)
in
AddMergedLabelsvc25
6 months agoHelper I
I keep getting an error "token Eof expected."