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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.