I need to duplicate multiple columns with PQ, and yes I can do it manually having either 10 steps or 1 entangled step with 10 duplicate column commands.
while I had similar problem with adding columns I used:
#"Added Custom" =
Table.AddColumn(#"Changed Type", "record", each [
Custom = "DTO",
#"Custom.1" = Date.ToText([Accounting Date],"YYYYMMDD"),
#"Custom.2" = "SA",
#"Custom.3" = "DTO " & Date.ToText([Accounting Date], "yyyy.MM"),
#"Custom.4" = null,
#"Custom.5" = null,
#"Custom.6" = null,
#"Custom.7" = null,
#"Custom.8" = null,
#"Custom.9" = if Text.StartsWith([General Ledger Code],"5") then [Cost Center] else null,
#"Custom.10" = null,
#"Custom.11" = null,
#"Custom.12" = null,
#"Custom.13" = if Text.StartsWith([General Ledger Code], "5") then "IF" else null
]),
#"Expanded record" = Table.ExpandRecordColumn(#"Added Custom", "record", {"Custom", "Custom.1", "Custom.2", "Custom.3", "Custom.4", "Custom.5", "Custom.6", "Custom.7", "Custom.8", "Custom.9", "Custom.10", "Custom.11", "Custom.12", "Custom.13"}, {"Custom", "Custom.1", "Custom.2", "Custom.3", "Custom.4", "Custom.5", "Custom.6", "Custom.7", "Custom.8", "Custom.9", "Custom.10", "Custom.11", "Custom.12", "Custom.13"}),
and it worked for adding columns
however I failed while trying to duplicate this with:
#"Duplicated test" = Table.AddColumn(#"Expanded record", "duplicated", each [
#"Custom.14" = Table.DuplicateColumn(#"Expanded record", "Custom.1", "Custom.1 - Copy"),
#"Custom.15" = Table.DuplicateColumn(#"Expanded record", "Custom.3", "Custom.3 - Copy")
]),
#"Expanded duplicated" = Table.ExpandRecordColumn(#"Duplicated test", "duplicated", {"Custom.14", "Custom.15"}, {"Custom.14", "Custom.15"}),
After expanding columns i received my whole table instead of just 2 additional columns.
Is there a way to simplify duplicating columns like adding columns?

Yes, you can simplify duplicating the columns by just using the
Table.AddColumnfunction as you did in the first step, no need for theTable.DuplicateColumnfunction: