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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
datasetleo
Helper I
Helper I

Loading multiple tables from a single excel workbook; then, creating separate queries for data model

Hi, All.

 

I am loading an Excel workbook with several tables in it (see screenshot). is there an elegant way to turn each table (or several tables that I filter) into separate queries for the data model?

 

I can create a separate query per table, manually - but, since I have multiple tables, I wonder if there is an automated way to do so.

 

Any help is appreciated! 

 

Thanks!

 

 

 

 

data.png

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @datasetleo 

I'm afraid there is no auto way like just one step could tramsform it to many tables.

I test with method below:

add an index column in original table from 1,

create a function like the following:

Capture11.JPG

(Sheetindex as number) =>
    let
        Source = #"2 26 xlsx",
        #"Filtered Rows" = Table.SelectRows(Source, each ([Index] = Sheetindex)),
        #"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows",{"Data"})
    in
        #"Removed Other Columns"

Then enter 1 or 2,3,4,5 to the "Parameter", invoke, i can get single query of each sheet data, then expand data and promote column headers.

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.