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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Curious_Money
New Member

SharePoint to Power BI connection error - "THE KEY DIDNT MATCH ANY ROWS"

Hello. I have my excel file hosted in SharePoint server and after connecting that to my Power BI interface, I built the visuals and dashboards. Now this data was half yearly. Now that I have a full year's data, I need to replace the file with the full years data. But as soon as I hit the refresh button, I am getting the error that "The key didnt match any rows". FYI: the column names are same, the column order is the same, file name is the same and the excel sheet name is also the same. Still, no luck. Please give me the solution on this. Also, I have a doubt that in the original data, I had to apply transformation step of consider the first row as headers. So, will that be causing an issue? Whatever might be causing the error....HELP ME SOLVE URGENTLYYYY.

1 ACCEPTED SOLUTION
v-sdhruv
Community Support
Community Support

Hi @Curious_Money ,
I hope your issue was resolved.
If you are still facing the issue, you can follow these steps to resolve-

1. Check “First Row as Header” Step

= Table.PromoteHeaders(PreviousStep)

Then when you replaced the file, if the first row is now already headers, Power BI will still try to promote that row, turning your actual headers into data. This often breaks the schema expected in the next step.

In Power Query Editor:

Find the step called Promote Headers or something similar.

If your new Excel already has headers, delete or skip this step.

Check the step after Promote Headers for errors. If you see column reference issues like #"Changed Type" failing, fix them based on the new header structure.

2. Check the Excel Sheet Navigation Step
Power BI uses a step like this to locate a sheet or table

= Source{[Item="Sheet1",Kind="Sheet"]}[Data]

If the Excel file structure internally changed (like from a table to a sheet, or vice versa), even with the same name, this step will fail.

Go back to Power Query Editor > Advanced Editor.

Look for something like:

Source = Excel.Workbook(Web.Contents("...")),
Navigation = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
Ensure the Kind is matching (e.g., "Sheet" vs "Table").

If needed, use the Navigator pane to re-select the correct sheet/table.

3. Check for Column Rename / Type Change Errors
Even though column names are the same, Power BI is very sensitive to case and whitespace (e.g., Sales ≠ sales).

In Power Query, go to the Changed Type step or any step that refers to specific column names.

If any column is missing, the step will break. Double-check spelling and order.

Re-map or remove problematic steps.

4. Test with a Clean Import
If the issue still isn't fixed, try this:

Open Power BI Desktop.

Go to Home > Get Data > SharePoint Folder.

Re-import the updated file.

Compare the steps with your original query.

This helps isolate whether it's the file or the steps causing the issue.
Hope this helps!
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You

View solution in original post

6 REPLIES 6
v-sdhruv
Community Support
Community Support

Hi @Curious_Money ,
Just wanted to check if you had the opportunity to review the suggestions provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You

v-sdhruv
Community Support
Community Support

Hi @Curious_Money ,
Just wanted to check if you had the opportunity to review the suggestions provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You

 

v-sdhruv
Community Support
Community Support

Hi @Curious_Money ,
Just wanted to check if you had the opportunity to review the suggestions provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You

v-sdhruv
Community Support
Community Support

Hi @Curious_Money ,
I hope your issue was resolved.
If you are still facing the issue, you can follow these steps to resolve-

1. Check “First Row as Header” Step

= Table.PromoteHeaders(PreviousStep)

Then when you replaced the file, if the first row is now already headers, Power BI will still try to promote that row, turning your actual headers into data. This often breaks the schema expected in the next step.

In Power Query Editor:

Find the step called Promote Headers or something similar.

If your new Excel already has headers, delete or skip this step.

Check the step after Promote Headers for errors. If you see column reference issues like #"Changed Type" failing, fix them based on the new header structure.

2. Check the Excel Sheet Navigation Step
Power BI uses a step like this to locate a sheet or table

= Source{[Item="Sheet1",Kind="Sheet"]}[Data]

If the Excel file structure internally changed (like from a table to a sheet, or vice versa), even with the same name, this step will fail.

Go back to Power Query Editor > Advanced Editor.

Look for something like:

Source = Excel.Workbook(Web.Contents("...")),
Navigation = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
Ensure the Kind is matching (e.g., "Sheet" vs "Table").

If needed, use the Navigator pane to re-select the correct sheet/table.

3. Check for Column Rename / Type Change Errors
Even though column names are the same, Power BI is very sensitive to case and whitespace (e.g., Sales ≠ sales).

In Power Query, go to the Changed Type step or any step that refers to specific column names.

If any column is missing, the step will break. Double-check spelling and order.

Re-map or remove problematic steps.

4. Test with a Clean Import
If the issue still isn't fixed, try this:

Open Power BI Desktop.

Go to Home > Get Data > SharePoint Folder.

Re-import the updated file.

Compare the steps with your original query.

This helps isolate whether it's the file or the steps causing the issue.
Hope this helps!
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You

v-sdhruv
Community Support
Community Support

Hi @Curious_Money ,
I hope your issue was resolved.
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You

anilelmastasi
Super User
Super User

Hello @Curious_Money ,

 

The problem occurs when you do not have access to that Sharepoint file and connect to Sharepoint file in Power BI with your credentials. Can you check that again please?

 

If this solved your issue, please mark it as the accepted solution.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.