Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Delete rows containing string.

Hey guys 🙂 I want to remove rows containing string in power query. Is there any option to solve my problem? 🙂
  • Mariusz's avatar
    6 years ago

    Hi Anonymous 

     

    If you are looking to preserve rows that contain numbers only, you can try this.

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSkxKNjQyVorViVaC0cYQKrEixdTMXCk2FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
        #"Filtered Rows" = Table.SelectRows(Source, each Text.Length( Text.Remove([Column1], {"0".."9"} ) ) = 0 )
    in
        #"Filtered Rows"

     

    Also, see the attached for the ref.

     

    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    LinkedIn