merge_columns
Combine multiple columns into a single new column using a specified separator in Power BI. Replaces source columns with merged data via Power Query.
Instructions
Power Query Merge Columns: concatenate two or more columns into one new column with a separator. Appends Table.CombineColumns (+ Combiner.CombineTextByDelimiter) to the table's M query. columns is comma-separated (the source columns are consumed).
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>",
"columns": "<columns>",
"separator": "<separator>",
"newColumnName": "<newColumnName>"
},
"name": "merge_columns"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| columns | Yes | columns to merge, comma-separated (at least two) | |
| separator | Yes | the separator placed between values, e.g. " " or ", " | |
| sessionId | Yes | ||
| newColumnName | Yes | the new combined column name | |
| partitionName | No | partition name (optional; defaults to the first partition) |