Forum Discussion
Changing Dataflow in Power Bi Desktop
Hi. I have a model linke dot an exisiting dataflow. I need ot make some major changes to the dataflow so planned to copy the exisiting one, make changes and then change the source in a copy version of my pbix file
1. Used the save as function in Fabric to create a copy dataflow Astoriom LIMS New (dnt know why it doesnt have a Task and if that is relevant?)
2. Also deleted an old dataflow Astoriom CRM I wasnt using. My fabric dashboard shows these dataflows
3. opened power desktop and went to power query
4. Went to query and clicked on navigation step cog and see this i.e. the LIMS new is missing and CRM that I deleted is still showing?
If i go to new sources/Fabric/dataflows I see what i expect
So the painful way to do this is to switch the long reference of the exisitng query for the new query. Full queries look like this so replace the 7bb...with 4cc.....
let
Source = PowerPlatform.Dataflows(null),
Workspaces = Source{[Id="Workspaces"]}[Data],
#"81828a1a-a49b-45fd-a1ec-b30e6145b36c" = Workspaces{[workspaceId="81828a1a-a49b-45fd-a1ec-b30e6145b36c"]}[Data],
#"7bbe5c44-f3e4-459b-baf1-3307a00fb76b" = #"81828a1a-a49b-45fd-a1ec-b30e6145b36c"{[dataflowId="7bbe5c44-f3e4-459b-baf1-3307a00fb76b"]}[Data],
#"Associate Baskets_" = #"7bbe5c44-f3e4-459b-baf1-3307a00fb76b"{[entity="Associate Baskets",version=""]}[Data]
in
#"Associate Baskets_"
let
Source = PowerPlatform.Dataflows(null),
Workspaces = Source{[Id="Workspaces"]}[Data],
#"81828a1a-a49b-45fd-a1ec-b30e6145b36c" = Workspaces{[workspaceId="81828a1a-a49b-45fd-a1ec-b30e6145b36c"]}[Data],
#"4cca0c64-a37c-4d0f-bd07-44c3b181ac92" = #"81828a1a-a49b-45fd-a1ec-b30e6145b36c"{[dataflowId="4cca0c64-a37c-4d0f-bd07-44c3b181ac92"]}[Data],
#"Associate Baskets_" = #"4cca0c64-a37c-4d0f-bd07-44c3b181ac92"{[entity="Associate Baskets",version=""]}[Data]
in
#"Associate Baskets_"
Seems wrong. Why cant I see the new dataflow when I click on the exisitng nvigation? sure i did this before when I changed the CRM source. I tried closing and reopening pbix. Any advice on the best way to redirect queries would be appreciated as have 20 of them.
Thanks
Hello mike_asplin ,
When you connect to a dataflow in Power BI Desktop, the query stores the dataflowId and other metadata in the M script. The navigation step cog only shows the structure that was retrieved at the time of the initial connection. It does not dynamically refresh the list of available dataflows. That is why:- The deleted dataflow still appears.
- The new dataflow does not appear in the navigation pane for the existing query.
This behaviour is expected because the navigation step is tied to the original dataflow connection.Best way to redirect queries to the new dataflow
Unfortunately, there is no built-in “switch source” option for dataflows like there is for datasets. The recommended approach is:Option 1: Manual replacement of dataflowId
You can edit the M code and replace the old dataflowId with the new one. For example:let Source = PowerPlatform.Dataflows(null), Workspaces = Source{[Id="Workspaces"]}[Data], #"81828a1a-a49b-45fd-a1ec-b30e6145b36c" = Workspaces{[workspaceId="81828a1a-a49b-45fd-a1ec-b30e6145b36c"]}[Data], #"4cca0c64-a37c-4d0f-bd07-44c3b181ac92" = #"81828a1a-a49b-45fd-a1ec-b30e6145b36c"{[dataflowId="4cca0c64-a37c-4d0f-bd07-44c3b181ac92"]}[Data], #"Associate Baskets_" = #"4cca0c64-a37c-4d0f-bd07-44c3b181ac92"{[entity="Associate Baskets",version=""]}[Data] in #"Associate Baskets_"Replace the old dataflowId with the new one for each query. This is the most direct method, but it can be tedious for 20 queries.Option 2: Parameterise the dataflowId
Create a parameter in Power Query for the dataflowId and reference it in all queries. This way, you only need to change the parameter value when switching sources:#"NewDataflowId" = "4cca0c64-a37c-4d0f-bd07-44c3b181ac92"This is a best practice for maintainability.Option 3: Reconnect and copy transformations
If the schema has changed significantly, it may be safer to connect to the new dataflow from scratch and then copy the transformation steps from the old queries. This avoids potential mismatches in entity names or structure.Why the “Task” column is blank for the new dataflow
In Fabric, the “Task” column relates to CI/CD or linked pipelines. If the new dataflow was created via Save As, it may not have an associated task yet. This does not affect connectivity in Power BI Desktop.If this response was helpful in any way, I’d gladly accept a 👍much like the joy of seeing a DAX measure work first time without needing another FILTER.
Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop 🌀.
2 Replies
- ZanquetaSuper User
Hello mike_asplin ,
When you connect to a dataflow in Power BI Desktop, the query stores the dataflowId and other metadata in the M script. The navigation step cog only shows the structure that was retrieved at the time of the initial connection. It does not dynamically refresh the list of available dataflows. That is why:- The deleted dataflow still appears.
- The new dataflow does not appear in the navigation pane for the existing query.
This behaviour is expected because the navigation step is tied to the original dataflow connection.Best way to redirect queries to the new dataflow
Unfortunately, there is no built-in “switch source” option for dataflows like there is for datasets. The recommended approach is:Option 1: Manual replacement of dataflowId
You can edit the M code and replace the old dataflowId with the new one. For example:let Source = PowerPlatform.Dataflows(null), Workspaces = Source{[Id="Workspaces"]}[Data], #"81828a1a-a49b-45fd-a1ec-b30e6145b36c" = Workspaces{[workspaceId="81828a1a-a49b-45fd-a1ec-b30e6145b36c"]}[Data], #"4cca0c64-a37c-4d0f-bd07-44c3b181ac92" = #"81828a1a-a49b-45fd-a1ec-b30e6145b36c"{[dataflowId="4cca0c64-a37c-4d0f-bd07-44c3b181ac92"]}[Data], #"Associate Baskets_" = #"4cca0c64-a37c-4d0f-bd07-44c3b181ac92"{[entity="Associate Baskets",version=""]}[Data] in #"Associate Baskets_"Replace the old dataflowId with the new one for each query. This is the most direct method, but it can be tedious for 20 queries.Option 2: Parameterise the dataflowId
Create a parameter in Power Query for the dataflowId and reference it in all queries. This way, you only need to change the parameter value when switching sources:#"NewDataflowId" = "4cca0c64-a37c-4d0f-bd07-44c3b181ac92"This is a best practice for maintainability.Option 3: Reconnect and copy transformations
If the schema has changed significantly, it may be safer to connect to the new dataflow from scratch and then copy the transformation steps from the old queries. This avoids potential mismatches in entity names or structure.Why the “Task” column is blank for the new dataflow
In Fabric, the “Task” column relates to CI/CD or linked pipelines. If the new dataflow was created via Save As, it may not have an associated task yet. This does not affect connectivity in Power BI Desktop.If this response was helpful in any way, I’d gladly accept a 👍much like the joy of seeing a DAX measure work first time without needing another FILTER.
Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop 🌀.
- mike_asplinHelper V
Thanks for explanation. I did similar when I recreated the CRM flow and sure I didnt have to copy all the IDs, but maybe i did. Seems a very clunky porcess for something that people will do allthe time in order to have version control. Thanks again.