none
remove rows based on text in a column RRS feed

  • Question

  • I have 1000's of rows and a column called "fun". I would like to remove all rows where the text in "fun" starts with "This is me". Is this possible? 
    Monday, March 6, 2017 7:32 PM

Answers

  • Watch this video how to use the column dropdown and filter on text that does not begin with "This is me".

    let
        Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Fun", type text}}),
        #"Filtered Rows" = Table.SelectRows(#"Changed Type", each not Text.StartsWith([Fun], "This is me"))
    in
        #"Filtered Rows"

    Monday, March 6, 2017 9:05 PM

All replies

  • Example:

    let
        Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
        AddedCustom = Table.AddColumn(Source, "Custom", each Text.StartsWith([fun], "This is me")),
        FilteredRows = Table.SelectRows(AddedCustom, each ([Custom] = false)),
        RemovedColumns = Table.RemoveColumns(FilteredRows,{"Custom"})
    in
        RemovedColumns

    Monday, March 6, 2017 8:01 PM
  • Watch this video how to use the column dropdown and filter on text that does not begin with "This is me".

    let
        Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Fun", type text}}),
        #"Filtered Rows" = Table.SelectRows(#"Changed Type", each not Text.StartsWith([Fun], "This is me"))
    in
        #"Filtered Rows"

    Monday, March 6, 2017 9:05 PM