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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
mitchellC
New Member

Issue: Slow Power Query Filter

I have a very simple query that is essentially just filtering a data set but it seems to be taking a long time. 

 

Can anyone see why this is taking so long just to do some basic minipulation of a not very large data set (1500 rows). 

 

 

let
Source = Excel.CurrentWorkbook(){[Name="BPC_Cost"]}[Content],

#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),

#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"EBITDA #", type any}, {"Lookup", type text}, {"Profit Centre", type text}, {"Cost Centre", type text}, {"Currency", type text}, {"Company Code", type text}, {"Account", type text}, {"Reference", type text}, {"Column9", type any}, {"1", type any}, {"2", type any}, {"3", type any}, {"4", type any}, {"5", type any}, {"6", type any}, {"7", type any}, {"8", type any}, {"9", type any}, {"10", type any}, {"11", type any}, {"12", type any}, {"13", type any}, {"1-avg", type any}, {"2-avg", type any}, {"3-avg", type any}, {"4-avg", type any}, {"5-avg", type any}, {"6-avg", type any}, {"7-avg", type any}, {"8-avg", type any}, {"9-avg", type any}, {"10-avg", type any}, {"11-avg", type any}, {"12-avg", type any}, {"13-avg", type any}}),

#"Filtered Rows1" = Table.SelectRows(#"Changed Type", each ([#"EBITDA #"] <> null and [#"EBITDA #"] <> "Named Range End")),

#"Added Custom" = Table.AddColumn(#"Filtered Rows1", "Tab Name", each "BPC_Costs"),

#"Reordered Columns" = Table.ReorderColumns(#"Added Custom",{"Tab Name", "EBITDA #", "Lookup", "Profit Centre", "Cost Centre", "Currency", "Company Code", "Account", "Reference", "Column9", "1", "2", "3", "4", "5", "6", "7", "8", "9","10","11","12","13","1-avg","2-avg","3-avg","4-avg","5-avg","6-avg","7-avg","8-avg","9-avg","10-avg","11-avg","12-avg","13-avg"})
in
#"Reordered Columns"

 

 

I have noticed I get a much quicker perfomance when I load the data to a new sheet as opposed to an existing sheet alongside the source data. Is there any reason for this?

4 REPLIES 4
v-hashadapu
Community Support
Community Support

Hi @mitchellC , Please let us know if your issue is solved. If it is, consider marking the answer that helped 'Accept as Solution', so others with similar queries can find it easily. If not, please share the details.
Thank you.

v-hashadapu
Community Support
Community Support

Hi @mitchellC , Please let us know if your issue is solved. If it is, consider marking the answer that helped 'Accept as Solution', so others with similar queries can find it easily. If not, please share the details.
Thank you.

v-hashadapu
Community Support
Community Support

Hi @mitchellC , Thank you for reaching out to the Microsoft Community Forum.

Please let us know if your issue is solved. If it is, consider marking the answers that helped 'Accept as Solution', so others with similar queries can find them easily. If not, please share the details.
Thank you.

lbendlin
Super User
Super User

There is no need to reorder columns. Power BI will ignore that and show columns alphabetically.

 

let
Source = Excel.CurrentWorkbook(){[Name="BPC_Cost"]}[Content],

#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),

#"Filtered Rows1" = Table.SelectRows(#"Promoted Headers" , each ([#"EBITDA #"] ?? "Named Range End") <>  "Named Range End")),

#"Added Custom" = Table.AddColumn(#"Filtered Rows1", "Tab Name", each "BPC_Costs")
in
#"Added Custom"

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors