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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Clone dataset programmatically

Hi, 

 

I have an azure blob storage account with containers for each of my in-company app users. Each container has many XMLs, all following the same structure. I would like to be able to make a new report for the data in each XML. 

 

My current setup is to have a PowerQuery with Parameters indicating the User and XML file to fetch, giving a dataset which I then  feed into a standardized Power BI report. To be able to do this for each XML, I intended to clone the master report and clone the dataset, then change the PowerQuery parameters in the new dataset to indicate which new user and XML file to report on.

 

I see that the REST API allows me to clone the report, however I am struggeling to clone the dataset. Does anyone have any suggestions as to how to proceed?

1 ACCEPTED SOLUTION

hi, @Anonymous 

I think you could export to multiple pbit files and then modify the query for different dataset, now publish different report.

https://fileinfo.com/extension/pbit

 

Regards,

Lin

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

View solution in original post

4 REPLIES 4
v-lili6-msft
Community Support
Community Support

hi @Anonymous 

I think use PowerQuery parameters is a great way for you.

And you could also try this way:

Copy the the M code in the Advanced Editor and then just adjust the conditinonal like PowerQuery parameters, now create a new  blank query and paste the code in its Advanced Editor.

https://docs.microsoft.com/en-us/power-bi/desktop-query-overview#the-advanced-editor

https://docs.microsoft.com/en-us/power-bi/desktop-common-query-tasks#query-formulas

For clone dataset by Rest API, it is not available in power bi for now, please refer to this document:

https://docs.microsoft.com/en-us/rest/api/power-bi/datasets

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-lili6-msft 

 

I have indeed already used a PowerQuery with parameters, however I cannot modify the query in the same dataset, since I want the cloned reports to connect to different datasets. Is there any way to achieve this?

hi, @Anonymous 

I think you could export to multiple pbit files and then modify the query for different dataset, now publish different report.

https://fileinfo.com/extension/pbit

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-lili6-msft ,

 

Thank you, this is the conclusion I came to aswell, and will attempt to implement. 

 

Regards,

Edvard

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Kudoed Authors