DATA TRAVELING

View Original

How to switch report live connection using Power BI Developer Mode

Context

Imagine that you have a thin report (a report with a live connection to a semantic model in Power BI Service), doing this we separate the semantic model to the report. I personally like this way of working, because you keep your semantic model centralized and you can build multiple reports based on the same semantic model. But nothing is perfect and imagine you want to change a DAX measure in a thin report, guess what? You can’t! (at least at the time of this writing). So, you have to go back to the semantic model, change the DAX measure, publish the semantic model in Power BI Service, go to your thin report and refresh it. Well, I don’t know about you, but I think this process time-consuming.

Way of working before Power BI Developer Mode

You had only two options (at least the two options I am aware of):

How could I do that with Power BI Developer Mode?

Well, that is what this blog post is about. So, stay tuned!

Understanding the problem

Don’t get me wrong, I like the idea of not being able to change anything in the semantic model of a thin report. But as a developer you want to optimize your time. See below the problem here:

Solution - Power BI Developer Mode

I assume you are already familiar with the Power BI Developer Mode and you are using the feature to save the Power BI file as pbip file.

Step 1: Save your Power BI file (pbix) as pbip file

Don’t forget to activate the preview feature in the settings (this feature is still in preview). See below the file folder:

Step 2: Check the thin report connection

I highly recommend to understand the file folder structure of the new Power BI Developer Mode, because you would be surprise with what can be done (especially if you saving as TMDL format).

You might be asking yourself, how can I check the thin report connection?

You can see that the report connects with a semantic model from Power BI Service. Let’s check step 3 to change the connection to the local model for further development and then change back the connection to Power BI Service.

Step 3: Switch the report connection

See below how to change the thin report connection to a local connection.

Now it is possible to make changes in the semantic model and at the report at the same time. When we are done changing the semantic model, we can change the connection back to the Power BI Service (or if you working with Git, you can just delete the change made in the file “definition.pbir” from the “Contoso Sales Overview.Report”).

Conclusion

In this post we talked about how to use the Power BI Developer Mode to enable a local developement of a thin report, without the need to republish the semantic model in Power BI Service. This can save you a lot of time!

Last updated on April 30, 2024