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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors