How to Connect Power Query in Power BI or Excel to a Sharepoint file.

Being able to connect Power BI or Power Query in Excel to files on Sharepoint is a really useful skill. While connecting to files on OneDrive or a hard drive is useful, for business continuity, Power BI or Excel reports based on datasets stored on these drives are hopeless. That’s because only one person easily has access to these drives. If they’re not around (ill, hollibobs, left the company etc) then what happens? The report falls over. Have a read of this article for more.

Any company that has Sharepoint has an easy solution though for business continuity. Simply store the supporting datasets on Sharepoint: then anyone can update the datasets and consequently the Power BI report. This post doesn’t take you through how to use the Excel File or Folder Connector, how to use the Sharepoint Folder connector.


Symbols

Video Chapters

  • 00:20 – What are my connector options?
  • 00:45 – How can I see my Sharepoint files when browsing for them in Power Query?
  • 01:20 – Disadvantage to using the Excel file or Folder Connectors?
  • 01:30 – What is a Gateway?
  • 02:07 – What is the Sharepoint Folder Connector?
  • 02:31- Use the Sharepoint Folder Connector in Power BI?
  • 03:02 – What is a Sharepoint root URL?
  • 06:08 – How can I find the exact folder on Sharepoint that I want?

Short On Time?

Instructions

a) In Power BI, Get Data and click More at the bottom of the menu. The Sharepoint Folder option pops up in the right hand side. In Excel, go to Data, then Get Data and then From File. From Sharepoint Folder is at the bottom of the menu list.

b) Put in the root URL of the Sharepoint folder that you want to connect to (see slide to the right)

c) Power BI may then ask you to sign in to Sharepoint. Select the Microsoft Account option on the left hand side of the pop up menu and click Sign In. If this doesn’t work then contact your IT team.

d) The Navigation menu should then pop up showing a list of all the files in Sharepoint underneath that root URL. Select Transform Data to be brought into the PowerQuery Editor.

e) To select the folder that you want, scroll to the far right of the Power Query Editor to see a column called [Folder Path]. Select the drop down menu and then either search manually through the folder pathway list or use the Text Filters option to tell Power BI the text string of the final folder using the ‘Contains’ option.

Instructions

a) A root URL IS NOT the actual folder address you want to connect to but the parent folder of the folder you want to connect to. Sharepoint root URLs should generally look something like this:

https://companyname.sharepoint.com/sites/site-name/

b) The ‘companyname’ part should be the name of your company, while the site-name will often by a department site like ‘Finance’ or ‘IT’. IT teams or whoever administers Sharepoint will probably restrict access different site and therefore make sure you’ve got access to the Sharepoint site before you try to connect through Power BI. Don’t use ‘www.’ and don’t forget to put the ‘/’ at the end of the root URL.

…and a little more

Be warned.

Using the Sharepoint Connector in PowerQuery is slow, much slower than using an Excel File or Folder connector. It is slow both to author queries in PowerQuery and slow to refresh data. If you don’t need the scheduled refresh capabilities, it may well be a better solution to use the Excel File or Folder Connector options as it will take you MUCH less time.


 

Discover more from The Finance Department Training Company

Subscribe now to keep reading and get access to the full archive.

Continue reading