pivot_text_values
Pivot text columns in Power Query tables by aggregating with Text.Combine, joining colliding values with a delimiter. Avoids default pivot errors on text values.
Instructions
Pivot TEXT values: Table.Pivot with a Text.Combine aggregation (the default pivot errors on text values). Colliding values in a cell are joined with delimiter (default ", "). Appends one step to the table's M query.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessionId": "<sessionId>",
"table": "<table>",
"attributeColumn": "<attributeColumn>",
"valueColumn": "<valueColumn>"
},
"name": "pivot_text_values"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| delimiter | No | delimiter joining colliding values (default ", ") | |
| sessionId | Yes | ||
| valueColumn | Yes | the text column whose values fill the pivoted cells | |
| partitionName | No | partition name (optional; defaults to the first partition) | |
| attributeColumn | Yes | the column whose distinct values become new columns |