sort_rows
Sort rows in a Power BI table by one or more columns with optional ascending or descending direction, appending Table.Sort to the M query.
Instructions
Power Query Sort Rows: sort by one or more columns. Appends Table.Sort to the table's M query. sorts is comma-separated as column[:direction], e.g. "Region:Ascending,Sales:Descending". direction = Ascending | Descending (default Ascending).
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>",
"sorts": "<sorts>"
},
"name": "sort_rows"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sorts | Yes | sort keys as column[:direction], comma-separated | |
| table | Yes | ||
| sessionId | Yes | ||
| partitionName | No | partition name (optional; defaults to the first partition) |