Forum Discussion

BlackBird's avatar
BlackBird
Helper I
1 year ago

Power Query x Excel - Reading source 7 ~ 8 times

Hey guys, I'm making a new report and I stumbled into a situation that never happened before. It looks like PQ is loading my excel file about 8 times, taking about 6 minutes:

 

only for these basic transformations:

 

 

let
    Source = Excel.Workbook(File.Contents("C:\Users\user\Downloads\Gestão Custos 2024_Dashboard.xlsx"), null, true),
    Database_Sheet = Source{[Item="Database",Kind="Sheet"]}[Data],
    #"Removed Top Rows" = Table.Skip(Database_Sheet,2),
    #"Promoted Headers" = Table.PromoteHeaders(#"Removed Top Rows", [PromoteAllScalars=true]),
    #"Removed Other Columns" = Table.SelectColumns(#"Promoted Headers",{"VP-2", "VP-3", "VP-4", "Corredor", "Cost Center", "Tipo", "Nome Tipo"}),
    #"Changed Type" = Table.TransformColumnTypes(#"Removed Other Columns",{{"VP-2", type text}, {"VP-3", type text}, {"VP-4", type text}, {"Corredor", type text}, {"Cost Center", type text}, {"Tipo", type text}, {"Nome Tipo", type text}}),
    #"Removed Duplicates" = Table.Distinct(#"Changed Type")
in
    #"Removed Duplicates"

 

 

 

The sheet I'm pulling data from have 10k rows and 231 columns. I now that the more columns the slower it gets, but why is it reading the file so many times? And what can I do to speed things up?

 

 

4 Replies