{"id":15841,"date":"2018-10-16T17:08:00","date_gmt":"2018-10-17T00:08:00","guid":{"rendered":"https:\/\/devwww.3cloudsolutions.com\/post\/power-bi-office-hours-power-bi-sharepoint-files-lists-folders-bluegranite-2\/"},"modified":"2023-11-29T16:15:15","modified_gmt":"2023-11-30T00:15:15","slug":"power-bi-office-hours-power-bi-sharepoint-files-lists-folders-bluegranite","status":"publish","type":"post","link":"https:\/\/3cloudsolutions.com\/resources\/power-bi-office-hours-power-bi-sharepoint-files-lists-folders-bluegranite\/","title":{"rendered":"Power BI Office Hours: Power BI Sharepoint Files, Lists, &#038; Folders"},"content":{"rendered":"<p><em>Microsoft\u2019s <a href=\"https:\/\/powerbi.microsoft.com\/en-us\/what-is-power-bi\/\" rel=\" noopener\">Power BI<\/a> SharePoint is the go-to tool for organizations looking to quickly gain deep insight. Accessible from pretty much anywhere \u2013 desktop, mobile or tablet \u2013 the business analytics solution brings data to life with brilliant visuals. During BlueGranite\u2019s interactive monthly <a href=\"https:\/\/www.blue-granite.com\/power-bi-office-hours-2018\">Power BI Office Hours<\/a>, open to all, we explore simple ways to pilot new features with this dynamic platform. <\/em><\/p>\n<p>Today we\u2019re looking at how to navigate SharePoint files, lists, and folders. You can follow along with the recorded presentation <a href=\"https:\/\/bluegranite.wistia.com\/projects\/awfuvg157e\">here<\/a>.<\/p>\n<p><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/Power-BI-Office-Hours-2.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/p>\n<p><span style=\"background-color: transparent;\">In our last Power BI Office Hours session, we previewed a few of the great features in the <\/span><a style=\"background-color: transparent;\" href=\"https:\/\/powerbi.microsoft.com\/en-us\/blog\/power-bi-desktop-september-2018-feature-summary\/\">September 2018 release of Power BI<\/a><span style=\"background-color: transparent;\">.<\/span><span style=\"background-color: transparent;\">\u00a0 <\/span><span style=\"background-color: transparent;\">We specifically looked at M IntelliSense, Copy and Paste in Tables\/Matrices, and Aggregations (preview) (demos begin at 7:39).<\/span><span style=\"background-color: transparent;\">\u00a0<\/span><span style=\"background-color: transparent;\">We had a lot of great questions at the end of the session, as well!<\/span><span style=\"background-color: transparent;\">\u00a0<\/span><span style=\"background-color: transparent;\">Keep those questions coming, and maybe we\u2019ll look at Project Online in the near future.<\/span><\/p>\n<p><!--more--><\/p>\n<p>An important note briefly touched on regarding Aggregations, and more specifically, Composite Models: remember that switching from DirectQuery to Import is an <em>irreversible operation<\/em>.\u00a0 It cannot be undone.\u00a0 So please be careful before changing storage modes willy-nilly.<\/p>\n<p>Our Use Case this month was pulling from SharePoint.\u00a0 For any of you that have tried (and, like me, initially failed) you know that this can be a painful process if you\u2019re not careful.\u00a0 In our demo (starts at roughly 21:05) we walk you through importing data from the three popular SharePoint sources: files, lists, and folders.<\/p>\n<p>If you have any questions, please don\u2019t hesitate to <a href=\"https:\/\/www.blue-granite.com\/contact-us\">contact us<\/a>\u00a0directly! Let\u2019s get started.<\/p>\n<p><span style=\"font-size: 30px;\"><strong>Using SharePoint Files<\/strong><\/span><\/p>\n<p>To use a file from SharePoint you don\u2019t use a SharePoint connector, you use the Web connector.\u00a0Once Power BI has connected to the file you choose, it\u2019s smart enough to extrapolate the file type and grab the right navigator dialog box.<\/p>\n<p>The trick is getting the correct URL to the SharePoint folder.\u00a0 The easiest way to do this is to open the file in question from SharePoint, and grab the URL from there.<\/p>\n<p>In the example below I have a SharePoint folder with a collection of different files. However, I\u2019m only interested in the <strong>Geography_Extended\u00a0<\/strong>file.<\/p>\n<p><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/Geography_Extended.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/p>\n<p>First, I\u2019ll open the file in SharePoint, and then\u00a0open the file from there in Excel (Desktop).<\/p>\n<p><span style=\"background-color: transparent;\"><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/Open-in-Excel-1.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/span><\/p>\n<p>Once I have the file open in Excel, I\u2019ll get the folder path in SharePoint by selecting <strong>File -&gt; Info\u00a0<\/strong>from the menu.\u00a0 I\u2019ll left-click the breadcrumb under the file name to copy the path to the Clipboard.\u00a0 Alternatively I could right-click where it says \u201cOpen File Location\u201d and select \u201cCopy path\u201d.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/Copy-Path-1.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/p>\n<p><span style=\"font-size: 14px;\"><em>(The result of \u201cCopy path\u201d is: \u201chttps:\/\/bluegranite1.sharepoint.com\/training\/powerbitraining\/Materials &#8211; Day 2 &#8211; Intermediate Power BI\/Source Files\u201d)<\/em><\/span><\/p>\n<p>From the <strong>Get Data<\/strong> menu I\u2019ll select \u201cOther \u2013 Web\u201d.<\/p>\n<p><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/Get-Data-1.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/p>\n<p>In the \u201cFrom Web\u201d dialog box I\u2019ll paste in the URL that I copied from Excel.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" style=\"width: 805px;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/From-Web-1.png\" alt=\"power bi sharepoint\" width=\"805\" \/><span style=\"font-size: 15px;\">**Notice: it\u2019s just the folder path. We need to manually type in the name of the file.**<\/span><\/p>\n<p style=\"text-align: center;\"><em style=\"font-size: 12px; text-align: center; background-color: transparent;\"><img decoding=\"async\" style=\"width: 805px;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/File-Path-2.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/em><\/p>\n<p>Power BI is now \u201csmart enough\u201d to grab the appropriate connector for the file, and I can continue working with the Excel file just as I would one that is stored locally.<\/p>\n<p><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/Navigator.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/p>\n<h2><strong><span style=\"font-size: 30px;\">Using Lists from SharePoint<\/span><\/strong><\/h2>\n<p>Here I have a list of Regional Directors that I maintain in a <strong>SharePoint List<\/strong>. Let\u2019s pull this into our Power BI dataset as well.<\/p>\n<p><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/SharePoint-List-1.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/p>\n<p>From the <strong>Get Data <\/strong>menu I\u2019ll search for \u201csharepoint\u201d and select the \u201cSharePoint Online List\u201d connector. (If your organization uses SharePoint on-premises you\u2019d select the \u201cSharePoint list\u201d connector)<\/p>\n<p><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/Get-Data-SharePoint-1.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/p>\n<p>The URL I\u2019m going to use is the <em>site-level<\/em> URL \u2013 i.e., no sub-sites.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" style=\"width: 805px;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/SharePoint-Lists-1.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/p>\n<p>The <strong>Navigator<\/strong> will display all Lists in that entire site independent of what page\/sub-site they appear on.<\/p>\n<p>We can search and select the list(s) that we want. I want the \u201cRegional Directors\u201d list.<\/p>\n<p><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/Regional-Director-List-1.png\" alt=\"power bi sharepoint\" width=\"805\" \/><span style=\"background-color: transparent;\">The list has a lot of columns I really don\u2019t care about \u2013 so I can eliminate them, just as I would any other data source, and continue about my business. I can also rename the columns to suit my needs, as I would with any other data source.<\/span><\/p>\n<p><span style=\"background-color: transparent;\"><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/Choose-Columns-1.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/span><\/p>\n<h2><strong>Using Folders from SharePoint<\/strong><\/h2>\n<p>Folders in SharePoint can get a little tricky because, like Lists, they exist at the site level as opposed to in the different Pages as we see them in the browser. So how to grab a few files from a SharePoint folder and consume additional files as they are placed in said folder?<\/p>\n<p>We need to get all the folders from the site in question and then start filtering them down. You\u2019ll see how we can consume multiple files in a folder as we go.<\/p>\n<p>I have a folder in SharePoint at the following location (not the true URL here, for illustrative purposes): <strong>SharePoint\/Training\/Power BI Training\/Materials Day 2\/Source Files<\/strong>. I want to pull any Excel files that start with \u201cStores\u201d in this folder. (I could also use this technique to pull only one file from a folder, but earlier we showed an easier way to pull just one file from SharePoint.)<\/p>\n<p><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/SharePoint-Folder-Data-1.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/p>\n<p>Let\u2019s use the SharePoint folder data source and the URL from the browser and give it a shot.<\/p>\n<p><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/Get-Data-SharePoint-Folder-1.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/p>\n<p><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/Invalid-URL-1.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/p>\n<p>Nope, that didn\u2019t do the trick.<\/p>\n<p>OK, let\u2019s try the part just before the \u201c\/Forms\/\u201d. In this case, \u201chttps:\/\/bluegranite1.sharepoint.com\/training\/powerbitraining\u201d.<\/p>\n<p><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/Unable-to-Connect-1.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/p>\n<p>Nope, that didn\u2019t do it either.<\/p>\n<p>Let\u2019s try one level higher: \u201chttps:\/\/bluegranite1.sharepoint.com\/training\u201d.<\/p>\n<p><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/SharePoint-Training-1.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/p>\n<p>OK, that did the trick \u2013 although now I\u2019ve got <em>many<\/em> more files than I hoped for. But I\u2019ve got that handy <strong>Folder Path<\/strong> column that I can probably use to narrow things down.<\/p>\n<p><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/Folder-Path-1.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/p>\n<p>Let\u2019s use our typical \u201cCombine &amp; Edit\u201d technique and see what happens.<\/p>\n<p><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/Combine-and-Edit-1.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/p>\n<p>Nope, that didn\u2019t do it. If I look at the screenshot above, I see that the first file found in the Training site is a .vsdx file, which isn\u2019t supported. Let\u2019s just Edit for now and get this data into the <strong>Query Editor<\/strong> and we\u2019ll see what we can do there.<\/p>\n<p><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/Query-Editor-1-1.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/p>\n<p>OK \u2013 so we\u2019ve got something in the <strong>Query Editor<\/strong>. Let\u2019s narrow things down a bit by filtering down the <strong>Folder Path<\/strong> column to just the folder we want and additionally filter to .xlsx files that start with \u201cStore\u201d. Remember that these filter steps will be applied <em>every time<\/em> I refresh the file, so I only have to do this navigation once.<\/p>\n<p><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/Power-Query-Editor-1.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/p>\n<p>There we go \u2013 we now have Power BI looking at just the files I want. I can now manually kick off the \u201cCombine\u201d wizard by clicking the button in the right corner of the \u201cContent\u201d column header.<\/p>\n<p><img decoding=\"async\" style=\"width: 371px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/Combine-Wizard-1.png\" alt=\"power bi sharepoint\" width=\"371\" \/><\/p>\n<p><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/Combine-Files-1.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/p>\n<p>Now we can continue on as though pulling from a network\/local folder.<\/p>\n<p><img decoding=\"async\" style=\"width: 805px; display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/Power-Query-Editor-1.png\" alt=\"power bi sharepoint\" width=\"805\" \/><\/p>\n<p><span style=\"background-color: transparent;\">Though I wish that pulling data from SharePoint was easier \u2013 especially for a SharePoint noob like myself \u2013 I hope this helps you on your Power BI journey.<\/span><\/p>\n<p>Discover many more Power BI tips and tricks when you check out our archived Office Hours <a href=\"https:\/\/bluegranite.wistia.com\/projects\/awfuvg157e\" target=\"_blank\" rel=\"noopener\">here<\/a> or join our next <a href=\"\/power-bi-office-hours-2018\" target=\"_blank\" rel=\"noopener\">Office Hours session on October 25th at 11am EST<\/a>\u00a0to learn more about what&#8217;s new in Power BI, plus get all of your questions answered!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today we previewed how to navigate SharePoint files, lists and folders for Power BI. Definitely a a game changing feature since the great features in the Sept 2018 release of Power BI.<\/p>\n","protected":false},"author":21,"featured_media":14180,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":""},"categories":[260],"tags":[273],"class_list":["post-15841","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-ai","tag-power-bi","topics-blog"],"acf":[],"_links":{"self":[{"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/posts\/15841","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/comments?post=15841"}],"version-history":[{"count":0,"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/posts\/15841\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/media\/14180"}],"wp:attachment":[{"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/media?parent=15841"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/categories?post=15841"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/tags?post=15841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}