update_template_measure
Modify a measure's DAX expression, format string, or display folder in a .pbit template's model without Power BI Desktop. Edits the DataModelSchema JSON directly, preserving any omitted field.
Instructions
Update an existing measure's DAX expression, format string and/or display folder in a closed .pbit template's model, editing the DataModelSchema JSON on disk with no Power BI Desktop. Any omitted field is left unchanged. Fails if the measure does not exist. Written back in place (with a .bak guard).
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": {
"pbitPath": "<pbitPath>",
"table": "<table>",
"name": "<name>"
},
"name": "update_template_measure"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | measure name | |
| table | Yes | home table of the measure | |
| pbitPath | Yes | path to the closed .pbit template | |
| expression | No | new DAX expression (omit to keep) | |
| formatString | No | new format string (omit to keep) | |
| displayFolder | No | new display folder (omit to keep) |