Table.ExpandTableColumn

통사론

Table.ExpandTableColumn(
    table as table,
    column as text,
    columnNames as list,
    optional newColumnNames as nullable list
) as table

소개

table[column]의 테이블을 여러 행과 열로 확장합니다. columnNames 내부 테이블에서 확장할 열을 선택하는 데 사용됩니다. 기존 열과 새 열 간의 충돌을 방지하려면 newColumnNames 지정합니다.

이 함수는 중첩 테이블 외에도 중첩된 레코드 목록 확장도 지원합니다.

예시

위치 열을 두 개의 새 열로 확장합니다.

사용량

Table.ExpandTableColumn(
    Table.FromRecords({
        [
            Company = "Contoso",
            Locations = Table.FromRecords({
                [City = "Redmond", State = "WA"],
                [City = "Bellevue", State = "WA"],
                [City = "Tempe", State = "AZ"]
            })
        ]
    }),
    "Locations",
    {"City", "State"},
    {"Locations.City", "Locations.State"}
)

출력

Table.FromRecords({
    [Company = "Contoso", Locations.City = "Redmond", Locations.State = "WA"],
    [Company = "Contoso", Locations.City = "Bellevue", Locations.State = "WA"],
    [Company = "Contoso", Locations.City = "Tempe", Locations.State = "AZ"]
})