Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Guys, good afternoon. I'm using powerbi embed to do some operations via code using its rest api.
What I want to do is use a base workspace (as if it were a template) and via code generate a copy of it with all its reports and datasets.
I can already create the workspace and clone the report to this new workspace, but I can't copy the data set to the new workspace. I didn't see this function either in the rest api or in the UI. I saw that through the rest api I can create the dataset by hand, but I need to inform all the tables and the type of columns in each table. I think this turns out to be unfeasible since I haven't found a way to get the metadata in the proper format to generate this new dataset.
Another approach I tried was via code to upload a data source via code to see if it generated a new dataset, but I couldn't get it to work.
Has anyone implemented something similar?
Hi,
I have done this task in different way. Instead of copying PBIX from worksapce, i uploaded PBIX file for my each client. In this way i got different Dataset for different clients. there is a small solution which works like below:
Problem Statement: "I have multiple clients. They wanted to see same power bi reports but they have their own databases. I can not create every report for every client one by one and deploy reports on Power BI Service workspace. And if there is a change in one report, i have to do same changes in all the reports for all of my clients."
Solution:
Thank you for the replies. I was able to make using pipelines via api to copy and generate a new workspace
Share the steps/solution that you tried so it can help other.
@Snmr I have a solution but that involves downloading dataset as JSON and then generating a database out of it with Python. Would that be feasible? You will have to re-populate the datasets, and you can bind reports using REST API later.
Can u plz share the solution!!
hey @AntrikshSharma , I just reviewed the article you posted, we are working on migrating reports across workspaces using powershell script, but it keeps creating new reports everytime we run the script, wondering if the same happens to your code too. Does it recognize the existing semantic model and overwrites it instead?
Hi @Snmr ,
If you use the feature Copy reports from other workspaces to copy the report in workspace A to workspace B, workspace B only references the dataset in Workspace A. And the dataset is not copied to Workspace B. You can copy the dataset from workspace A to workspace B by following these steps if you have the build permission for the dataset in workspace A:
1. Get the pbix file
Download a report from the Power BI service to Power BI Desktop
Download .pbix file
2. Open the pbix file in Power BI Desktop and change the data source
How to Change Data Sources for Existing Power BI Reports - Iteration Insights
Change data source
3. Save it after updated the data source and publish it to workspace B
And if you need to duplicate all of the content in workspace A to workspace, please check if the following blog can help you figure out.
Duplicate workspaces using the Power BI REST APIs: a step-by-step tutorial
Best Regards
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
6 | |
6 | |
3 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
3 |