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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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