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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Manimalinc
Frequent Visitor

get data from multiple Excel sheets in one file hosted in Sharepoint

Hi Everyone

 

I hope you can help me here

 

so I have an excel file multilple worksheets( Matt, Anna, Carsten ,Dimitry etc etc )  and  all same data format   (person,date,booking Type,Product,Customer,Status etc ,etc )

 

I can grab all this in a simple single query in Powerbi, using "from Excel" however as its a local file  i cannot have automated refresh. 

 

let
Source = Excel.Workbook(File.Contents("C:\Users\Matt\Documents\Meetinginfo.xlsx"), null, true),
#"Filtered Rows" = Table.SelectRows(Source, each [Name] = "Matt" or [Name] = "Anna" or [Name] = "Carsten" or [Name] = "Dimitry" ),
#"Expanded Data" = Table.ExpandTableColumn(#"Filtered Rows", "Data", {"Column1", "Column10", "Column2", "Column3", "Column4", "Column5", "Column6", "Column7", "Column8", "Column9"}, {"Column1", "Column10", "Column2", "Column3", "Column4", "Column5", "Column6", "Column7", "Column8", "Column9"}),
#"Promoted Headers" = Table.PromoteHeaders(#"Expanded Data", [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Agent", type text}, {"Date", type any}, {"booking type", type text}, {"customer", type text}, {"Partner", type text}, {"Requestor", type text}, {"status", type text}, {"comments", type text}}),
#"Filtered Rows1" = Table.SelectRows(#"Changed Type", each ([Agent] <> null and [Agent] <> "Agent") and ([Date] <> null)),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows1",{"Anna", "Agent", "Language", "Date", "booking type", "Product", "customer", "Partner", "Requestor", "status", "comments"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Removed Other Columns",{{"Date", type date}}),
in
#"Removed Columns"

 

So i save it in Sharepoint, but how do i now make the query filter by "the file" - I have to do this first right ? 

AND then the sheets 
I hope this makes sence. In essence i want a multi sheet excel file report that I can aut refresh ...

1 ACCEPTED SOLUTION

Note that you also could have just clicked on the "Binay" hyperlink to drill into the Excel workbook (and not create all the extra stuff that comes from the Combine & Transform functionality.

 

Pat

Microsoft Employee

View solution in original post

5 REPLIES 5
Manimalinc
Frequent Visitor

I think I have solved it!!  Noting here for anyone else passing by .....

 

Once you filter on your specific file from the SharePoint folder , 

remove all columns except "Binary

(1)  Click "Combine files" button. 

 

power.png

 

in the "Combine files" pop out window

 

(2) Right click on the file  ( in my case called perameter2 ... Not sure why ... )

and select transform data

 

Now you have the same starting point as a local Excel file, and it will allow a scheduled refresh !!!

 

 

Note that you also could have just clicked on the "Binay" hyperlink to drill into the Excel workbook (and not create all the extra stuff that comes from the Combine & Transform functionality.

 

Pat

Microsoft Employee

Hi Pat

now I see this also "Right click" on "Binary" and select drilldown !!

 

thanks - thats even quicker 

Manimalinc
Frequent Visitor

Hi Pat 

 

Thanks but my issue is once I have filtered on the specific file, I do not seem to have the option to "filter" again on "sheets".

ppm1
Solution Sage
Solution Sage

You can use Web.Contents to get to a specific Excel file on SharePoint, but I usually just use the SharePoint Folder connector (uses the site URL) and navigate to the file that way. From there, your query steps would be the same.

 

Pat

 

Microsoft Employee

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors