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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors