{"id":1285,"date":"2022-11-19T16:26:36","date_gmt":"2022-11-19T14:26:36","guid":{"rendered":"https:\/\/www.flip-design.de\/?p=1285"},"modified":"2022-11-19T16:26:36","modified_gmt":"2022-11-19T14:26:36","slug":"change-the-data-source-from-a-local-directory-to-onedrive-inside-power-bi","status":"publish","type":"post","link":"https:\/\/www.flip-design.de\/?p=1285","title":{"rendered":"Change the data source from a local directory to OneDrive inside Power BI"},"content":{"rendered":"\n<p>In the past, some customers asked me, how can I change the path for a local, imported file, to a path which can be refreshed by Power BI Online. You have two options, you can install a Power BI Data Gateway or you can move your data to online storage, like OneDrive. The first one should be managed by your IT department, so I think the OneDrive solution is much easier.<br>But let us start at the beginning. I imported a local file to my data model.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image.png\"><img decoding=\"async\" loading=\"lazy\" width=\"945\" height=\"532\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image.png\" alt=\"\" class=\"wp-image-1286\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image.png 945w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-300x169.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-768x432.png 768w\" sizes=\"(max-width: 945px) 100vw, 945px\" \/><\/a><\/figure>\n\n\n\n<p>If we look to the Advanced Editor inside Power Query, we see the lo al file connector.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-1.png\"><img decoding=\"async\" loading=\"lazy\" width=\"945\" height=\"483\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-1.png\" alt=\"\" class=\"wp-image-1287\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-1.png 945w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-1-300x153.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-1-768x393.png 768w\" sizes=\"(max-width: 945px) 100vw, 945px\" \/><\/a><\/figure>\n\n\n\n<p>So, I uploaded the file to my OneDrive Share.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-2.png\"><img decoding=\"async\" loading=\"lazy\" width=\"945\" height=\"291\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-2.png\" alt=\"\" class=\"wp-image-1288\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-2.png 945w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-2-300x92.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-2-768x236.png 768w\" sizes=\"(max-width: 945px) 100vw, 945px\" \/><\/a><\/figure>\n\n\n\n<p>You can grab the connection string from your browser:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-3.png\"><img decoding=\"async\" loading=\"lazy\" width=\"945\" height=\"51\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-3.png\" alt=\"\" class=\"wp-image-1289\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-3.png 945w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-3-300x16.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-3-768x41.png 768w\" sizes=\"(max-width: 945px) 100vw, 945px\" \/><\/a><\/figure>\n\n\n\n<p>After that, you can get new data from the SharePoint folder.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-4.png\"><img decoding=\"async\" loading=\"lazy\" width=\"921\" height=\"199\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-4.png\" alt=\"\" class=\"wp-image-1290\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-4.png 921w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-4-300x65.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-4-768x166.png 768w\" sizes=\"(max-width: 921px) 100vw, 921px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-5.png\"><img decoding=\"async\" loading=\"lazy\" width=\"945\" height=\"296\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-5.png\" alt=\"\" class=\"wp-image-1291\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-5.png 945w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-5-300x94.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-5-768x241.png 768w\" sizes=\"(max-width: 945px) 100vw, 945px\" \/><\/a><\/figure>\n\n\n\n<p>Now, we get every file which is stored inside the OneDrive folder. After clicking \u201cTransform Data\u201d, we can filter our file by the folder and\/or filename.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-6.png\"><img decoding=\"async\" loading=\"lazy\" width=\"945\" height=\"708\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-6.png\" alt=\"\" class=\"wp-image-1292\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-6.png 945w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-6-300x225.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-6-768x575.png 768w\" sizes=\"(max-width: 945px) 100vw, 945px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-7.png\"><img decoding=\"async\" loading=\"lazy\" width=\"945\" height=\"461\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-7.png\" alt=\"\" class=\"wp-image-1293\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-7.png 945w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-7-300x146.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-7-768x375.png 768w\" sizes=\"(max-width: 945px) 100vw, 945px\" \/><\/a><figcaption class=\"wp-element-caption\"><img decoding=\"async\" loading=\"lazy\" width=\"605\" height=\"295\" src=\"file:\/\/\/C:\/Users\/phlenz\/AppData\/Local\/Temp\/msohtmlclip1\/01\/clip_image002.jpg\" alt=\"Graphical user interface\n\nDescription automatically generated\"><br>Now, navigate to the Advanced Editor and copy the whole M code.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-8.png\"><img decoding=\"async\" loading=\"lazy\" width=\"945\" height=\"368\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-8.png\" alt=\"\" class=\"wp-image-1294\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-8.png 945w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-8-300x117.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-8-768x299.png 768w\" sizes=\"(max-width: 945px) 100vw, 945px\" \/><\/a><figcaption class=\"wp-element-caption\">After copying the code, we can paste it to our original query and delete the new query. Now, we can upload the report to Power BI and configure the automatic refresh.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-9.png\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"541\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-9-1024x541.png\" alt=\"\" class=\"wp-image-1295\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-9-1024x541.png 1024w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-9-300x158.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-9-768x405.png 768w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/11\/image-9.png 1271w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>In the past, some customers asked me, how can I change the path for a local, imported file, to a path which can be refreshed by Power BI Online. You have two options, you can install a Power BI Data &hellip; <a href=\"https:\/\/www.flip-design.de\/?p=1285\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/1285"}],"collection":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1285"}],"version-history":[{"count":1,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/1285\/revisions"}],"predecessor-version":[{"id":1296,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/1285\/revisions\/1296"}],"wp:attachment":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}