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
Simon_29
Helper II
Helper II

problem with Power Query updating new data from named file

Hello,

I have a problem with Power Query updating new data. I found a function that works by typing the name and path of the folder I want to load into Power Query into a cell in Excel. I created such a cell + cell where I enter the path to this file. I pasted the code into the "Advanced Editor". And it always worked. However, now after a long time I have inserted a new file in that folder and when I refresh it completely I get this error and the wrong data is inserted into "Item = ...". For some reason, it doesn't take the folder name I gave but creates its own. Can anyone advise me on this problem please?

Thank you very much I'm sending screenshots of errors and my code.

error.png

error which is displayed when refreshing

error2.png

named cell: VerifiName

โ€ƒโ€ƒ

error3.png

โ€ƒError from PQ

error6.png

error4.png

Code in Advanced Editor

error5.png

Item is taking name Order Verification instead of ORDER VERIFICATION

โ€ƒโ€ƒโ€ƒ

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Simon_29 

 

Agree with @AlexisOlson that M language is case-sensitive, which is the cause. The values in this step should be consistent with the values in Item and Kind columns. 

21120801.jpg

 

As it is using Excel.Workbook() to extract the file, the names in Item column with "Sheet" kind are from the Sheet names in the Excel file, not the name of the Excel file. If you want to use your function, you need to keep the sheet name in the Excel file identical with the file name. 

21120802.jpg

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @Simon_29 

 

Agree with @AlexisOlson that M language is case-sensitive, which is the cause. The values in this step should be consistent with the values in Item and Kind columns. 

21120801.jpg

 

As it is using Excel.Workbook() to extract the file, the names in Item column with "Sheet" kind are from the Sheet names in the Excel file, not the name of the Excel file. If you want to use your function, you need to keep the sheet name in the Excel file identical with the file name. 

21120802.jpg

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

AlexisOlson
Super User
Super User

M language is case-sensitive, so I suspect that might be the issue here.

 

Try inputting "Order Verification" rather than "ORDER VERIFICATION".

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.

Top Solution Authors