set_template_column
Edit a column's properties in a closed .pbit template's DataModelSchema JSON. Set data type, format, hidden flag, sort-by, and summarization; omitted properties unchanged, backup created.
Instructions
Patch properties of an existing column in a closed .pbit template's model - data type, format string, hidden flag, sort-by column and default summarisation - editing the DataModelSchema JSON on disk with no Power BI Desktop. Any omitted property is left unchanged. Fails if the column does not exist. Written back in place (with a .bak guard).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | table that owns the column | |
| column | Yes | column name | |
| dataType | No | data type, e.g. int64, decimal, double, string, dateTime, boolean (omit to keep) | |
| isHidden | No | hide (true) or show (false) the column (omit to keep) | |
| pbitPath | Yes | path to the closed .pbit template | |
| summarizeBy | No | default summarisation, e.g. none, sum, count, average, min, max (omit to keep) | |
| formatString | No | format string, e.g. "#,0" or "0.0%" (omit to keep) | |
| sortByColumn | No | sort-by column name (omit to keep) |