Table.DuplicateColumn

Table.DuplicateColumn(table as table,columnName as text,newColumnName as text,optional columnType as nullable type) as table

将名为 columnName 的列复制到表 table。列 newColumnName 的值和类型从列 columnName 复制。

示例:

将列 "a" 复制到表 ({[a = 1, b = 2], [a = 3, b = 4]}) 中名为 "copied column" 的列。

使用情况:

Table.DuplicateColumn(Table.FromRecords({[a = 1, b = 2], [a = 3, b = 4]}), "a", "copied column")

输出:
Table.FromRecords({ [
        a = 1,
        b = 2,
        #"copied column" = 1
    ], [
        a = 3,
        b = 4,
        #"copied column" = 3
    ]
}, {
    "a",
    "b",
    "copied column"
})

results matching ""

    No results matching ""