Forum Discussion
dynamic format string live connection issue
- 2 days ago
Hi powerbiexpert22,
Dynamic format strings need to be defined in the semantic model, so you can't normally add them directly when using a live connection.
If you have access to edit the original semantic model, I would recommend making the changes there. Your report can then remain live-connected, and other reports using the same model can benefit from the changes too.
If you want to work locally, you can open the downloaded PBIX, make the changes, and publish the updated semantic model back to Power BI Service. Just be careful not to overwrite the existing model unintentionally.
Another option is to select “Make changes to this model” in Power BI Desktop. This creates a local model on top of the remote semantic model, but it doesn't convert the connection to Import mode, and it may not overcome the dynamic format string limitation.
For reference, see Microsoft's documentation: https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-dynamic-format-strings
Hi powerbiexpert22,
I would avoid downloading the semantic model and repointing the report to an Import model just for this.
A dynamic format string is a property of the measure in the semantic model. If you have access to modify the published semantic model, the cleanest option is to define the dynamic format string on the measure there. Your live-connected report can then continue using the shared semantic model without being repointed.
Microsoft documents dynamic format strings here: Create dynamic format strings for measures.
If you do need report-specific model changes and cannot modify the shared semantic model, use Make changes to this model in Power BI Desktop. That adds a local model and changes the connection to DirectQuery against the published semantic model; it does not convert the remote semantic model to Import mode.
See: Use composite models in Power BI Desktop.
For formatting that is only needed on a particular visual, visual-level custom format strings may also be enough, but they are not equivalent to a conditional dynamic format string on the measure.
I would only use FORMAT() as a fallback because it converts the result to text, whereas a dynamic format string keeps the measure numeric.
So in short: if possible, add the dynamic format string to the shared semantic model. If that is not possible, adding a local model is preferable to duplicating/reimporting the entire semantic model.
AI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.