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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Split data source/query table into tables/querys

excel into PBIexcel into PBI

 

Hi,

 

above is how my power bi data query looks when inmported from excel. Is there a way I can break out this into 2 seperate tables or querys?

 

I want to split it up but I also want to make sure once data is changed in excel it changes both queries/tables en though they are split up. If possible I would like to split it up into 2 queries in power BI without having to split it up in excel the excel sheet.

4 REPLIES 4
Anonymous
Not applicable

I would like for rows 2-7 be their own table/query

Anonymous
Not applicable

Hey Karla,

 

Your two queries should be something along these lines.

 

First Table:

let
    Source = Excel.Workbook(File.Contents("---insert file path---"), null, true),
    Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Active Projects - 48", type text}, {"Computer Users", Int64.Type}, {"Project IT Staff", Int64.Type}, {"""AS Sold"" Project Cost", Int64.Type}, {"Project IT Budgets Current IT Spend of all Projects", Int64.Type}, {"Current IT Spend of all Projects", Int64.Type}, {"Column7", type text}, {"Column8", type any}, {"Column9", type any}, {"Column10", type text}, {"Column11", type any}}),
    #"Kept First Rows" = Table.FirstN(#"Changed Type", each [#"Active Projects - 48"] <> null),
    #"Removed Other Columns" = Table.SelectColumns(#"Kept First Rows",{"Active Projects - 48", "Computer Users", "Project IT Staff", """AS Sold"" Project Cost", "Project IT Budgets Current IT Spend of all Projects", "Current IT Spend of all Projects"})
in
    #"Removed Other Columns"

Second Table:

let
    Source = Excel.Workbook(File.Contents("---insert file path---"), null, true),
    Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
    #"Kept Last Rows" = Table.LastN(Sheet1_Sheet, each [Column1] <> null),
    #"Promoted Headers" = Table.PromoteHeaders(#"Kept Last Rows", [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Mega Projects", type text}, {"Forecast Completion", type date}, {"Project % Complete", Int64.Type}, {"Computer Users", Int64.Type}, {"Craft", Int64.Type}, {"Project IT Staff", Int64.Type}, {"""AS Sold"" Project Cost", type text}, {"Project IT Budgets", Int64.Type}, {"% of ""As Sold"" Contract", Int64.Type}, {"Current IT Spend", type text}})
in
    #"Changed Type"

Please note that this is not the cleanest way to pull in data and you will have to edit the query if columns change.

 

Kind regards,

Alex

Anonymous
Not applicable

As for source,

 

it's coming for Sharepoint. It's an excel sheet uploaded into SharePoint. But when I get the SharePoint link it doesn't work it makes me narrow it down.

 

When I inmported the data I went through sharepoint folder and had to search for the excel sheet.

 

How do I go about the srouce?

Anonymous
Not applicable

@Anonymous 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.