Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I need help to understand this error message (above image) and how to fix it, thanks
Solved! Go to Solution.
A typical case would be when you connect to an Excel file and then your Query attemps to access a Sheet that does not exist in the Spreadsheet...
In case anyone who has the same scenarion that is trying to import data from folder with multiple files in it, try this way by defining a name that is identical across all the file and this is the key despite different file name or worksheet name.
All the best ..
A user of mine was having this issue. He was connecting to a database though. I gave him Select permission on the database and he was no longer receivinmg this error after refreshing the query.
It's too late. But this might be useful for someone.
When using an Excel spreadsheet and a table connected to PQ, sometimes that table name gets changed unknowingly. Especially when you copy-paste inside the table. Another scenario is the sheet name gets changed too.
I have found this happens.
Thanks.
Not actually an error, odd Power BI behaviour imo.
I had this message for the first time today, on a scheduled report which has been running for months. It uses combine files, but there's been no change to the file location or structure.
For me this error message disappeared whilst I was testing the sample file step, I added steps afterwards to expand the table view and the error on the earlier step vanished. I removed the added step and refreshed the report and it was fine. Bizarre.
Hi,
Are you able to share what steps you added? I believe I have a similar issue. The structure of my data hasn't changed and the tab name remains the same. But everytime a new file is added to the folder (Everyday) the refresh breaks due to this error. It seems to be trying to add a blank row to the dataset in each time
The issue for me was that across 50+ workbooks, the first sheet was not always named the same. The soultion was to dynamically pick up the first sheet on each workbook, rather than taking the hard coded variable from the sample combine effort.
> Advanced editor on the Transofrm File
> Comment out the "data_sheet" line, and add the "FirstSheet" line. Bingo.
let
Source = (Parameter1 as binary) => let
Source = Excel.Workbook(Parameter1, null, true),
FirstSheet = Table.SelectRows(Source, each [Kind] = "Sheet"){0}[Data],
// Data_Sheet = Source{[Item="Data",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(FirstSheet, [PromoteAllScalars=true])
in
#"Promoted Headers"
in
Source
- Click duplicate on source on the right ( Applied step)
- It show a table--> You can see at the Hiddens column--> It's "False"
- Click on "Table" on Data column.
- It's show a msg box (Pic 2) --> Choose continuos
It's solved
Thank you, this was my solution. But I needed to re-create all steps afterwards. In my case it was easy...
I got this error, when I changed the table name in PowerBI Desktop (Fields category)
I had the same error message connecting to a tabular model via visual studio.
When I validated the query, "The query statement is valid."
Going into the "Design" view is when I got the error.
I fixed it from the "Query" menu, selected refresh query, and it worked.
I had the same problem today.
This is how I fixed it:
Make sure to go under advanced editor on Power BI
I conected my excel workbook as tables inside Power BI, so in this case you need to make sure that the file location, file name and most important, table name is correct.
______________
let
Source = SharePoint.Files("FILE LOCATION", [ApiVersion = 15]),
#"FILE NAME xlsx_FILE LOCATION" = Source{[Name="FILE NAME.xlsx",#"Folder Path"="FILE LOCATION"]}[Content],
#"Imported Excel Workbook" = Excel.Workbook(#"FILE NAME xlsx_FILE LOCATION"),
Table = #"Imported Excel Workbook"{[Item="TABLE NAME",Kind="Table"]}[Data]
in
Table
_______________
Go under Formulas Tab > Name Manager
Select the table you want and click edit. This name should be the one you have to insert under Power BI conection above
Make sure to do this to every imported table on you model
I started having this error after populating the file path with daily workbooks where the name of the sheet wasn't the same as my query / Transform Sample File
(My power query reads from many workbooks wich are the same except for the name of the sheet which is named after each workbook)
The query was attemping to find in all the workbooks the same sheet name as in my data transformation example.
I tried to sorted it out by removing the Navigation stept in the query but did not work.
How did it work? >In the Transform Sample File, I opened the Advanced Editor and changed the name of the Sheet to zero
It was>
Source = Excel.Workbook(Parameter1,null,true)
#"03_21_4_20_Sheet"=Source {[Item="03__21_4_20",Kind="Sheet"]}[Data],
I changed it to >
Source = Excel.Workbook(Parameter1,null,true)
#"03_21_4_20_Sheet"=Source {0}[Data],
Regards,
This one worked for me, thank you!
If you are combining Excel Tables: All tables' names should be the same
If you are combining Excel Sheets: All sheets' names should be the same
As simple as that
Thanks.
John
In my case this error occured when one of the sheets was called differently
I had this error today, and the solution was..... close the database - and all Access databases- that linked to my source file(s). SHAZZAMM! Fixed.
1. First locate the error and find the problematic step,For me the error occurs in "Invoke Custom Function" step, and error is :"An error occurred in the ‘Transform File’ query. Expression.Error: The key didn't match any rows in the table."
2. Find the "Transform File" Function
= (Parameter1) => let Source = Excel.Workbook(Parameter1, null, true), Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data], #"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]) in #"Promoted Headers"
This code is created according to the excel of the example, prompting other workbooks in our folder, should also be named “sheet1”
3.So, just rename all workbooks under the folder sheet's name to "sheet1", this problem can be solved.
Hi,
one more thing that may resolve your problem. Close view in SQL you are trying to pull data from and give Power Bi a try.
dan
Thanks, resolved my issue.
User | Count |
---|---|
93 | |
84 | |
78 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |