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
kpeterson
Frequent Visitor

New File Source Not Recognized

I recently added a new file to a SharePoint folder and am having issues connecting to it.  I'd like to just update my query to point to the new file but it is saying that it can't find the file.  However, I can start a new query and find the file that I need.  

 

Query

= SharePoint.Files("https://xxx.sharepoint.com/sites/PowerBI", [ApiVersion = 15])

= Source{[Name="FY23 AM Data.xlsx",#"Folder Path"="https://xxx.sharepoint.com/sites/PowerBI/Shared Documents/Power BI Files/CIP Files/"]}[Content]

= Excel.Workbook(#"FY23 AM Data xlsx_https://xxx sharepoint com/sites/PowerBI/Shared Documents/Power BI Files/CIP Files/")

 

The last is giving me the error Expression.Error: The name 'FY24 AM Data xlsx_https://xxx sharepoint com/sites/PowerBI/Shared Documents/Power BI Files/CIP Files/' wasn't recognized. Make sure it's spelled correctly.

 

But again, I can connect to it using a new query just fine.  I've even tried copying and pasting the last step in the new query to the query I'm trying to update.  TIA!

 

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @kpeterson 

 

#"FY23 AM Data xlsx_https://xxx sharepoint com/sites/PowerBI/Shared Documents/Power BI Files/CIP Files/" is the result returned by a step called "FY23 AM Data xlsx_https://xxx sharepoint com/sites/PowerBI/Shared Documents/Power BI Files/CIP Files/". In your query, it should be the second step's name. Make sure the step name is also modified to be consistent with the query referenced in its following step Excel.Workbook(#"previous step name").  

 

vjingzhang_0-1683598064757.png

 

I recommend that you don't include file name and folder path in step names, then you just need to modify the values after = next time. For example,

 

let
    Source = SharePoint.Files("https://xxx.sharepoint.com/sites/PowerBI", [ApiVersion = 15]),
    File = Source{[Name="FY23 AM Data.xlsx",#"Folder Path"="https://xxx.sharepoint.com/sites/PowerBI/Shared Documents/Power BI Files/CIP Files/"]}[Content],
    Result = Excel.Workbook(File)
in
    Result

 

When you create a new query to connect to the new file, step names are generated automatically to be consistent with the corresponding file and folder path, so it doesn't have this problem. 

 

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

1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @kpeterson 

 

#"FY23 AM Data xlsx_https://xxx sharepoint com/sites/PowerBI/Shared Documents/Power BI Files/CIP Files/" is the result returned by a step called "FY23 AM Data xlsx_https://xxx sharepoint com/sites/PowerBI/Shared Documents/Power BI Files/CIP Files/". In your query, it should be the second step's name. Make sure the step name is also modified to be consistent with the query referenced in its following step Excel.Workbook(#"previous step name").  

 

vjingzhang_0-1683598064757.png

 

I recommend that you don't include file name and folder path in step names, then you just need to modify the values after = next time. For example,

 

let
    Source = SharePoint.Files("https://xxx.sharepoint.com/sites/PowerBI", [ApiVersion = 15]),
    File = Source{[Name="FY23 AM Data.xlsx",#"Folder Path"="https://xxx.sharepoint.com/sites/PowerBI/Shared Documents/Power BI Files/CIP Files/"]}[Content],
    Result = Excel.Workbook(File)
in
    Result

 

When you create a new query to connect to the new file, step names are generated automatically to be consistent with the corresponding file and folder path, so it doesn't have this problem. 

 

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

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