मुख्य कंटेंट तक स्किप करें

Table.Unpivot

तालिका में स्तंभों के सेट को विशेषता-मान युग्मों में परिवर्तित करता है.

Syntax

Table.Unpivot(
table as table,
pivotColumns as list,
attributeColumn as text,
valueColumn as text
) as table

Remarks

तालिका में स्तंभों के सेट को प्रत्येक पंक्ति में शेष मानों के साथ संयजित किए गए विशेषता-मान युग्मों में परिवर्तित करता है.

Examples

Example #1

स्तंभ "a", "b" और "c" को तालिका <code>({[ key = "x", a = 1, b = null, c = 3 ], [ key = "y", a = 2, b = 4, c = null ]})</code> में ले जाएँ और उन्हें विशेषता-मान युग्मों में अनपिवट करें.

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"
)

Result:

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]
})

Category

Table.Column operations