Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
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!
Solved! Go to Solution.
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").
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.
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").
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.
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.