pivot_column
Transform a table by pivoting an attribute column's distinct values into new columns, aggregating a value column with Sum, Count, Average, Min, or Max. Updates the Power Query M code directly.
Instructions
Power Query Pivot Column: turn the distinct values of an attribute column into new columns, aggregating a value column. Appends Table.Pivot to the table's M query. aggregation = Sum | Count | Average | Min | Max (default Sum).
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_column"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| sessionId | Yes | ||
| aggregation | No | Sum | Count | Average | Min | Max (default Sum) | |
| valueColumn | Yes | the 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 column headers |