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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

I'm editing data and I have an entire line of "error" but Power Query Editor won't let me delete it.

I have an entire line of "Error" as shown below. I can't determine what's causing the Error as in Excel - my data source - it's just a normal line - line 1653. It's also where Power Query stops showing my data but that's ok because I don't need the data below.

 

Capture.PNG

 

After filtering I'm left with the 60 rows I need but still can't get rid of the error line. When I try to delete it, I get this message:

 

Capture2.PNG

 

Anyone have any advice? It would be greatly appreciated.

1 ACCEPTED SOLUTION
AlB
Community Champion
Community Champion

Hi @Anonymous 

Try this for the "Energia Elétrica R600 (Euros)" query. I have not looked into the other one but possibly it can be fixed with a similar approach. You'll still have to complete it with further steps I guess (the ones that the error prevented you from adding) See it all at work in the attached file.

 

let
    Source = Excel.Workbook(File.Contents("d:\Downloads\OneDrive_2021-04-19\power bi\Book1.xlsx"), null, true),
    #"R600-APE_Sheet" = Source{[Item="R600-APE",Kind="Sheet"]}[Data],
    #"Replaced Errors1" = Table.ReplaceErrorValues(#"R600-APE_Sheet", List.Transform(Table.ColumnNames(#"R600-APE_Sheet"), each {_,""})),
    #"Removed Top Rows" = Table.Skip(#"Replaced Errors1",2),
    #"Removed Columns" = Table.RemoveColumns(#"Removed Top Rows",{"Column1"}),
    #"Promoted Headers" = Table.PromoteHeaders(#"Removed Columns", [PromoteAllScalars=true]),
    #"Removed Blank Rows" = Table.SelectRows(#"Promoted Headers", each not List.IsEmpty(List.RemoveMatchingItems(Record.FieldValues(_), {"", null}))),
    #"Removed Columns1" = Table.RemoveColumns(#"Removed Blank Rows",{"Column16", "Column17", "Column18", "Column19", "Column20", "Column21", "Column22", "Column23", "Column24", "Column25", "Column26", "Column27", "Column28", "Column29", "Column30", "Column31", "Column32", "Column33", "Column34", "Column35", "Column36", "Column37", "Column38", "Column39", "Column40", "Column41", "Column42", "Column43", "Column44", "Column45", "Column46", "Column47", "Column48", "Column49", "Column50", "Column51", "Column52", "Column53", "Column54", "Column55", "Column56", "Jan_1", "Fev_2", "Mar_3", "Abr_4", "Mai_5", "Jun_6", "Jul_7", "Ago_8", "Set_9", "Out_10", "Nov_11", "Dez_12", "2021_13"}),
    #"Removed Top Rows1" = Table.Skip(#"Removed Columns1",1),
    #"Filtered Rows" = Table.SelectRows(#"Removed Top Rows1", each ([Descrição] = "Estimativa" or [Descrição] = "Forecast" or [Descrição] = "RAID" or [Descrição] = "Real" or [Descrição] = "Year-1")),
    #"Replaced Errors" = Table.ReplaceErrorValues(#"Filtered Rows", {{"Descrição", "0"}}),
    #"Removed Errors" = Table.RemoveRowsWithErrors(#"Replaced Errors"),
    #"Removed Errors1" = Table.RemoveRowsWithErrors(#"Removed Errors", {"Descrição"}),
    #"Removed Errors2" = Table.RemoveRowsWithErrors(#"Removed Errors1", {"Descrição"})
in
    #"Removed Errors2"

 

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

View solution in original post

3 REPLIES 3
AlB
Community Champion
Community Champion

Hi @Anonymous 

Try this for the "Energia Elétrica R600 (Euros)" query. I have not looked into the other one but possibly it can be fixed with a similar approach. You'll still have to complete it with further steps I guess (the ones that the error prevented you from adding) See it all at work in the attached file.

 

let
    Source = Excel.Workbook(File.Contents("d:\Downloads\OneDrive_2021-04-19\power bi\Book1.xlsx"), null, true),
    #"R600-APE_Sheet" = Source{[Item="R600-APE",Kind="Sheet"]}[Data],
    #"Replaced Errors1" = Table.ReplaceErrorValues(#"R600-APE_Sheet", List.Transform(Table.ColumnNames(#"R600-APE_Sheet"), each {_,""})),
    #"Removed Top Rows" = Table.Skip(#"Replaced Errors1",2),
    #"Removed Columns" = Table.RemoveColumns(#"Removed Top Rows",{"Column1"}),
    #"Promoted Headers" = Table.PromoteHeaders(#"Removed Columns", [PromoteAllScalars=true]),
    #"Removed Blank Rows" = Table.SelectRows(#"Promoted Headers", each not List.IsEmpty(List.RemoveMatchingItems(Record.FieldValues(_), {"", null}))),
    #"Removed Columns1" = Table.RemoveColumns(#"Removed Blank Rows",{"Column16", "Column17", "Column18", "Column19", "Column20", "Column21", "Column22", "Column23", "Column24", "Column25", "Column26", "Column27", "Column28", "Column29", "Column30", "Column31", "Column32", "Column33", "Column34", "Column35", "Column36", "Column37", "Column38", "Column39", "Column40", "Column41", "Column42", "Column43", "Column44", "Column45", "Column46", "Column47", "Column48", "Column49", "Column50", "Column51", "Column52", "Column53", "Column54", "Column55", "Column56", "Jan_1", "Fev_2", "Mar_3", "Abr_4", "Mai_5", "Jun_6", "Jul_7", "Ago_8", "Set_9", "Out_10", "Nov_11", "Dez_12", "2021_13"}),
    #"Removed Top Rows1" = Table.Skip(#"Removed Columns1",1),
    #"Filtered Rows" = Table.SelectRows(#"Removed Top Rows1", each ([Descrição] = "Estimativa" or [Descrição] = "Forecast" or [Descrição] = "RAID" or [Descrição] = "Real" or [Descrição] = "Year-1")),
    #"Replaced Errors" = Table.ReplaceErrorValues(#"Filtered Rows", {{"Descrição", "0"}}),
    #"Removed Errors" = Table.RemoveRowsWithErrors(#"Replaced Errors"),
    #"Removed Errors1" = Table.RemoveRowsWithErrors(#"Removed Errors", {"Descrição"}),
    #"Removed Errors2" = Table.RemoveRowsWithErrors(#"Removed Errors1", {"Descrição"})
in
    #"Removed Errors2"

 

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

Check for any steps that change Data format. These get added automatically. Delete them and then work out what the issue is. Likely a text string in a numeric column, or similar.

 

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

AlB
Community Champion
Community Champion

Hi @Anonymous 

Can you share the excel file and the query you are using to read it, so that we reproduce the issue and look into it?

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors