add_measure
Add a DAX measure to a Power BI table, committing it to the live model or writing offline to a PBIP semantic model's TMDL.
Instructions
Add a DAX measure to a table. Commits to the live model (persist with File > Save in Desktop). target=pbip: pass pbipFolder instead of sessionId to write the measure OFFLINE into a PBIP semantic model's TMDL (no engine; collision-checked, /// doc comments preserved).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "add_measure"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dax | No | DAX expression, e.g. SUM(Sales[Amount]) | |
| name | No | measure name | |
| table | No | home table for the measure | |
| sessionId | No | sessionId from connect_model (live engine; pass exactly one of sessionId / pbipFolder) | |
| pbipFolder | No | target=pbip: a PBIP <name>.SemanticModel / TMDL definition folder to edit OFFLINE (engine-free) | |
| description | No | description | |
| formatString | No | format string, e.g. "#,0" or "0.0%" | |
| displayFolder | No | display folder |