cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alawode
Frequent Visitor

Connecting Sharepoint based excel spreadhseet to power BI

Hi Experts,

I have a Excel spreasheet that will located in sharepoint (it currently on My desktop) , and i have built a Report using this Excel spreadhseet.

I was wondering what the most efficeint way to Publish this report is, since the Excel spreasheet will be moved to sharepoint and updated manually every week? Thanks in advance

1 ACCEPTED SOLUTION
edhans
Super User III
Super User III

You can change the connection for this report this way, including putting the file on SharePoint.

  1. Put the file in SharePoint. You'll need the URL of the SharePoint site - not to the file, just the site.  So it would be something like https://TenantName.sharepoint.com/sites/SiteName
  2. Use that URL when you connect to SharePoint from in Power BI.
  3. In Power BI, you only need to repeat the steps to get to the "grid of data" - so you'll navigate to or find the file, open it, then open the correct tab.
  4. Now, take that M code and move it to the original code you have, replacing the first 2-3 steps.
  5. Delete the SharePoint connection you created in steps 2/3. You just needed that for the code.

The reason for doing this is the table that Power BI is using cannot be replaced with another table of the same name later. Power BI doesn't use table names internally, it uses numbers, so if "Sales" is table 10, if you remove Sales and replace with a new Sales, it might get an ID of 33, and no measures or visuals will work.

 

This article will help you do it step by step: See this article if you need help using this M code in your model.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

1 REPLY 1
edhans
Super User III
Super User III

You can change the connection for this report this way, including putting the file on SharePoint.

  1. Put the file in SharePoint. You'll need the URL of the SharePoint site - not to the file, just the site.  So it would be something like https://TenantName.sharepoint.com/sites/SiteName
  2. Use that URL when you connect to SharePoint from in Power BI.
  3. In Power BI, you only need to repeat the steps to get to the "grid of data" - so you'll navigate to or find the file, open it, then open the correct tab.
  4. Now, take that M code and move it to the original code you have, replacing the first 2-3 steps.
  5. Delete the SharePoint connection you created in steps 2/3. You just needed that for the code.

The reason for doing this is the table that Power BI is using cannot be replaced with another table of the same name later. Power BI doesn't use table names internally, it uses numbers, so if "Sales" is table 10, if you remove Sales and replace with a new Sales, it might get an ID of 33, and no measures or visuals will work.

 

This article will help you do it step by step: See this article if you need help using this M code in your model.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Kudoed Authors