Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Managing Dev,Test and Prod Environments in Power BI Desktop.

Hi Everyone,

 

Being a newbie, I need help to understand if there are any best practises when it comes to working with several environments.

 

Is it recommended to build your reports in all environments ?

If yes, is it recommended to build your reports manually in all environments or are there any possibilities to "transfer" from DEV to TEST for example ?

 

Any other tips/comments are welcome.

 

Thank you!

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Anonymous,

 

You can build your reports in different environments and you can transfer from Dev to test or prod by using data source parameter.

 

d1.png

 

Then we can get data using the Parameter that we created. In power query we can get different data of different environment by changing the Current value.For more details, please check the online document.

 

d2.pngd3.png

 

Here is the M code in power query for your reference.

 

let
    Source = Sql.Databases(Parameter1),
    Power_BI_Test = Source{[Name="databasename"]}[Data],
    dbo_Financial_1 = databasename {[Schema="dbo",Item="Financial_1"]}[Data]
in
    dbo_Financial_1

Regards,

Frank

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

4 REPLIES 4
v-frfei-msft
Community Support
Community Support

Hi @Anonymous,

 

You can build your reports in different environments and you can transfer from Dev to test or prod by using data source parameter.

 

d1.png

 

Then we can get data using the Parameter that we created. In power query we can get different data of different environment by changing the Current value.For more details, please check the online document.

 

d2.pngd3.png

 

Here is the M code in power query for your reference.

 

let
    Source = Sql.Databases(Parameter1),
    Power_BI_Test = Source{[Name="databasename"]}[Data],
    dbo_Financial_1 = databasename {[Schema="dbo",Item="Financial_1"]}[Data]
in
    dbo_Financial_1

Regards,

Frank

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

I doubt this something you can do only for Import mode and Not on Direct Query. 

You cannot make new columns since that will ask you to import all tables:

HalloWorld_0-1713213776310.png

Yet, you can get around that a bit. Write as much as you can in the sql query (and do the rest in DAX measures perhaps):

= Sql.Database(environment, "testDB", [Query="select * from dbo.test"])

(I tested a bigger query as well). Then, you need to agree to run a native database query:

HalloWorld_1-1713214109755.png

After that, close by taking over the change:

HalloWorld_2-1713214188303.png

And your model will be parametrized with the value that you chose, and you can change it again in the "Transform data" tool:

HalloWorld_3-1713214450338.png

 

 

 

Anonymous
Not applicable

Thank you Frank !

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.