Træning
Modul
Transform data by implementing pivot, unpivot, rollup, and cube - Training
This content is a part of Transform data by implementing pivot, unpivot, rollup, and cube.
Denne browser understøttes ikke længere.
Opgrader til Microsoft Edge for at drage fordel af de nyeste funktioner, sikkerhedsopdateringer og teknisk support.
Table.UnpivotOtherColumns(table as table, pivotColumns as list, attributeColumn as text, valueColumn as text) as table
Oversætter alle andre kolonner end et angivet sæt til attribut/værdi-par kombineret med resten af værdierne i hver række.
Oversætter alle andre kolonner end et angivet sæt til attribut/værdi-par kombineret med resten af værdierne i hver række.
brug
Table.UnpivotOtherColumns(
Table.FromRecords({
[key = "key1", attribute1 = 1, attribute2 = 2, attribute3 = 3],
[key = "key2", attribute1 = 4, attribute2 = 5, attribute3 = 6]
}),
{"key"},
"column1",
"column2"
)
output
Table.FromRecords({
[key = "key1", column1 = "attribute1", column2 = 1],
[key = "key1", column1 = "attribute2", column2 = 2],
[key = "key1", column1 = "attribute3", column2 = 3],
[key = "key2", column1 = "attribute1", column2 = 4],
[key = "key2", column1 = "attribute2", column2 = 5],
[key = "key2", column1 = "attribute3", column2 = 6]
})
Træning
Modul
Transform data by implementing pivot, unpivot, rollup, and cube - Training
This content is a part of Transform data by implementing pivot, unpivot, rollup, and cube.