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

filter for first sheet in transform file parameter (connecting to excel files in a folder)

I'm attempting to connect to a folder of excel files in Power Query.  I want it to pull the first sheet regardless of the sheet name. The query to load the data references the "Transform File . . " parameter as opposed to any specific sheet. I've seen demos where you can replace absolute sheet names with {0}, {1}, etc  but I am not sure how that would work in this scenario:transform file test.jpgsheet test.jpg

The "Sheettest" is the first sheet in this example.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

You want to replace "Sheet1_Sheet =" line with the line below:

 

Sheet1_Sheet = Table.SelectRows(Source,each [Kind] = "Sheet"){0}[Data],

View solution in original post

1 REPLY 1
Anonymous
Not applicable

You want to replace "Sheet1_Sheet =" line with the line below:

 

Sheet1_Sheet = Table.SelectRows(Source,each [Kind] = "Sheet"){0}[Data],

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.