Обучение
Модул
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.
Този браузър вече не се поддържа.
Надстройте до Microsoft Edge, за да се възползвате от най-новите функции, актуализации на защитата и техническа поддръжка.
Table.Unpivot(table as table, pivotColumns as list, attributeColumn as text, valueColumn as text) as table
Translates a set of columns in a table into attribute-value pairs, combined with the rest of the values in each row.
Take the columns "a", "b", and "c" in the table ({[ key = "x", a = 1, b = null, c = 3 ], [ key = "y", a = 2, b = 4, c = null ]})
and unpivot them into attribute-value pairs.
Usage
Table.Unpivot(
Table.FromRecords({
[key = "x", a = 1, b = null, c = 3],
[key = "y", a = 2, b = 4, c = null]
}),
{"a", "b", "c"},
"attribute",
"value"
)
Output
Table.FromRecords({
[key = "x", attribute = "a", value = 1],
[key = "x", attribute = "c", value = 3],
[key = "y", attribute = "a", value = 2],
[key = "y", attribute = "b", value = 4]
})
Обучение
Модул
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.