Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

remove errors rows

How to remove error rows without losing original data 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hello Anonymous , what do you mean by remove error rows without losing original data?

     

    You want the error values to be replaced with null then

    you can do something like this

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8nNUitWJVvLNz0jMA7MMDQyUYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Name = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Name", Int64.Type}}),
        #"Replaced Errors" = Table.ReplaceErrorValues(#"Changed Type", {{"Name", null}})
    in
        #"Replaced Errors"

9 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello Anonymous , what do you mean by remove error rows without losing original data?

     

    You want the error values to be replaced with null then

    you can do something like this

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8nNUitWJVvLNz0jMA7MMDQyUYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Name = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Name", Int64.Type}}),
        #"Replaced Errors" = Table.ReplaceErrorValues(#"Changed Type", {{"Name", null}})
    in
        #"Replaced Errors"
    • Anonymous's avatar
      Anonymous
      Not applicable

      check the given code.

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        ok thanks for your valuable suggestions

         

    • Anonymous's avatar
      Anonymous
      Not applicable

      thanks for your reply but the problem is 

      by using  remove errors option actual data is also removed from the same row 

      • Vijay_A_Verma's avatar
        Vijay_A_Verma
        Most Valuable Professional

        Select all columns of the table. To do this, you can press CTRL+A

        Transform menu - Replace values - Replace errors - put null

        This will replace only error values with null and will not touch any other data in your rows.

    • Anonymous's avatar
      Anonymous
      Not applicable

      hi vijay ,

      thanks for your reply but the problem is 

      by using  remove errors option actual data is also removed from the same row