add_measure_local
Create or update a DAX measure directly in the open Power BI Desktop model, specifying table, name, expression, and optional format string.
Instructions
Tạo mới hoặc cập nhật một Measure DAX trực tiếp vào mô hình Power BI Desktop đang mở (TOM).
Với thao tác modeling hàng loạt/phức tạp, ưu tiên MCP powerbi-modeling (Microsoft) nếu có.
port / model_id: lấy từ list_local_reports.
table_name: bảng chứa Measure (ví dụ: 'Sales').
measure_name: tên Measure (ví dụ: 'Total Sales').
expression: công thức DAX (ví dụ: 'SUM(Sales[Amount])').
format_string: định dạng hiển thị (ví dụ: '#,0' hoặc '0.0%').
description: mô tả ghi chú.
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": {
"port": "<port>",
"model_id": "<model_id>",
"table_name": "<table_name>",
"measure_name": "<measure_name>",
"expression": "<expression>"
},
"name": "add_measure_local"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | Yes | ||
| model_id | Yes | ||
| expression | Yes | ||
| table_name | Yes | ||
| description | No | ||
| measure_name | Yes | ||
| format_string | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |