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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Using parameters to change workspace name for getting dataflows

Hello,

 

  My PowerBI desktop is pulling data from dataflows. I have a set of dataflows that point to my development server in a workspace named tstdataflows and a list of dataflows that point to my production server in prddataflows. I would like to use parameters to switch bwetween my test and production workspaces. I have enabled parameters in the destop client, but am unable to tell where to put the parameter name. Any advice?

 

Cheers,

 

Peter

5 REPLIES 5
chrissto
Frequent Visitor

Hey @Anonymous ,

 

maybe I come to late to the party, but I solved this in the advanced editor with follwoing query:

let
    Source = PowerPlatform.Dataflows(null),
    Workspaces = Source{[Id="Workspaces"]}[Data],
    #"ws" = Workspaces{[workspaceName=#"Workspace"]}[Data],
    #"df" = #"ws"{[dataflowName=#"Dataflow"]}[Data],
    Table= #"df"{[entity="Fakt_Mieter",version=""]}[Data]
in
    Table
Anonymous
Not applicable

Any ideas onthis issue?

Anonymous
Not applicable

Hi @Anonymous ,

 

You may check this:

Power Query (M)agic: Parameters for Dataflows!

And the link below is included in the article above and maybe a better solution.

Pimp the dataflows connector in Power BI

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Update: just to clarify:

here is my Dataflow source for my CatalogType datasource:

let
Source = PowerBI.Dataflows(null),
#"Step1" = Source{[workspaceId="827b08we-92b9-4188-bb0e-c46484fb39d8"]}[Data],
#"Step2" = #"Step1"{[dataflowId="8a898189-fe4d-4b8b-97w2-f983f399d77c"]}[Data],
CatalogType1 = #"Step2"{[entity="CatalogType"]}[Data]
in
CatalogType1

 

And that will show me all of the data in the CatalogType datasource.

 

I have a query called Dataflows that lists the workspaceid in a column called workspaceId, and the dataflowId in a column called CatalogType

 

How do I replace the long strings in the datasource with the column values in the Dataflows table?

 

Thanks!

Anonymous
Not applicable

Hello,

 

  I created the Dataflows query mentioned in the articles. I have verified that the Dataflows[workspaceId] and Dataflows[Catalogtype] have the correct vlaues in for the workspace ID and dataflow id. I updated my dataflow source to be the following:

 

let
Source = PowerBI.Dataflows(null),
#"Step1" = Source{[workspaceId=Dataflows[workspaceId]]}[Data],
#"Step2" = #"Step1"{[dataflowId=Dataflows[CatalogType]]}[Data],
CatalogType1 = #"Step2"{[entity="CatalogType"]}[Data]
in
CatalogType1

 

it seems to fail on line 5 when I try to create the Catalogtype entity with the following error:

error.jpg

All I am trying to do is easily switch between my test and production environments.

 

Cheers,

 

Peter

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.