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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
avitalo1
Frequent Visitor

onedrive for business folder and an existing power bi report

 Hi,

 

I have a report created on PowerBi desktop with the source folders on my local drive.

After I created the report I moved the folders to onedrive.

 

How can I fix the M so that I can use the onedrive folders in the cloud (and not have to change all the sources each time I open the report on a different computer).

 

If this cannot be done, what is the best way to connect to the folders and rebuild my report?

 

thanks

Avital 

1 ACCEPTED SOLUTION

You don't have to build a new report.  Here is a recent video that shows how to get data from a OneDrive file using the SharePoint Folder connector.  Just build the new query, and then copy the steps of the new query and replace the Source (and maybe a few more steps) of your existing query.  You may have to update your step references so the each step references the table/variable before it (e.g., #"Changed Type").  WIth this approach, your original table will stay in the model with all the relationships, measures, visuals, etc. still intact.

 

https://www.youtube.com/watch?v=cxRacjMb47I

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

4 REPLIES 4
Mariusz
Community Champion
Community Champion

Hi @avitalo1 

 

If you cannet to this file/folder in one drive you can later copy all the steps from your previous query using Advanced Editor ( usually everything after Changed Type should be ok ) and later paste into the advanced editor of this new query after Changed Type.

 

As you connect to the same file, only the first few steps should be different as different functions are used to connect to different data sources or storages.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Thanks. Can you recommend a good tutorial for connecting to the onedrive and for copying the steps?
I would still love to find a solution that wouldn't require building a new report. 

You don't have to build a new report.  Here is a recent video that shows how to get data from a OneDrive file using the SharePoint Folder connector.  Just build the new query, and then copy the steps of the new query and replace the Source (and maybe a few more steps) of your existing query.  You may have to update your step references so the each step references the table/variable before it (e.g., #"Changed Type").  WIth this approach, your original table will stay in the model with all the relationships, measures, visuals, etc. still intact.

 

https://www.youtube.com/watch?v=cxRacjMb47I

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Thanks. Had to fiddle with the existing code, mainly changing the parameter numbers, but finally managed to get this to work.

Will be much smarter about the next report.

 

Thank you again for the help

Avital

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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