rename_shared_expression
Rename a shared Power Query expression and update all references across the model. Detects conflicting local names to prevent unsafe text rewrites.
Instructions
Rename a shared Power Query expression (parameter / staging query) AND rewrite every #"name" and bare-identifier reference to it across the other shared expressions and table partitions (string literals and comments are never touched). Refuses with the offending document list when another M document declares the same name locally (a let-step or lambda parameter shadows the shared name there, so a text rewrite would be unsafe). Refresh before saving the .pbix.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | current shared expression name | |
| newName | Yes | new name | |
| sessionId | Yes |