Forum Discussion
Visual Indicator for which Semantic Model Your Report is Running Against?
- 2 years ago
Clever solution!
Hi thx1137,
We also have a similar reporting structure, where we have DEV, TEST, and PROD Power BI Datasets deployed in 3 different workspaces. Each report uses a live connection to connect to datasets/ semantic models in each workspace.
In our case, we have created a parameter in the dataset itself called as Environment. It's value is set to Development, Test or Production, depending upon which workspace we are going to publish the workspace in.
This Environment parameter value is then displayed as a card on top of the page in our reports, indicating which dataset the report is currently connected to.
Don't forget to Enable Load for the parameter created, otherwise it won't be available in the Reporting Tab.
Similarly, we have also created a parameter for the workspace name and used it to display on top of the report page.
Although it's not an automated solution where we are automatically fetching workspace names as per the location of the semantic model, it still works well for us.
If you have to get the Workspace Name (and other related details) in the report automatically, you would have to make use of Power BI APIs and cmdlets to get that data, which would be an overkill.
- https://docs.microsoft.com/en-us/powershell/power-bi/overview?view=powerbi-ps
- https://docs.microsoft.com/en-us/rest/api/power-bi/
Let me know if the suggestion helps!