This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello All,
I'm trying to summarize a folder of Excel invoices, and have done this quite a few times before with an invoked function call, but have run into this problem for the first time, hoping you can help me out. The data that I want is always on Sheet 1 of the Excel document, but that particular sheet has a different name in each file. How can I refer to Sheet 1 without using the name? Here is the particular line in my code:
(myPath,myFile) =>
let
Source = Excel.Workbook(File.Contents(myPath&myFile),null,true),
#"April 18 Support _Sheet" = Source{[Item="April 18 Support ",Kind="Sheet"]}[Data],
Thanks for your help.
Solved! Go to Solution.
Add this line. It will get the first sheet regardless of its name.
= Table.SelectRows(Source, each [Kind] = "Sheet"){0}[Data]Do that right after the SOURCE line that shows all objects in the file. You'll probably need to delete the default NAVIGATION step Power Query does.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingAdd this line. It will get the first sheet regardless of its name.
= Table.SelectRows(Source, each [Kind] = "Sheet"){0}[Data]Do that right after the SOURCE line that shows all objects in the file. You'll probably need to delete the default NAVIGATION step Power Query does.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThanks very much! That worked perfectly!
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 32 | |
| 26 | |
| 23 | |
| 22 | |
| 15 |
| User | Count |
|---|---|
| 63 | |
| 45 | |
| 28 | |
| 24 | |
| 22 |