Forum Discussion

craig811's avatar
craig811
Helper III
6 years ago
Solved

How do i delete rows with text

Hi,

 

In colum1 I want to delete rows with text 'Ending Balance for Period' and 'GL JE Name'  how would I do this?

 

Many thanks 

  • Just filter them out. The logic here is you won't technically be removing them, but you'll be selecting all rows that don't have that text.

     

    1. On the column where this text appears, click the filter icon dropdown next to the column name and select Text Filters, then Does Not Contain
    2. Fill in the dialog box as shown below.

    It will generate code similar to this:

     

    =Table.SelectRows(#"Changed Type", each not Text.Contains([ID], "Ending Balance for Period") and not Text.Contains([ID], "GL JE Name"))

     

     

3 Replies

  • edhans's avatar
    edhans
    Community Champion

    Just filter them out. The logic here is you won't technically be removing them, but you'll be selecting all rows that don't have that text.

     

    1. On the column where this text appears, click the filter icon dropdown next to the column name and select Text Filters, then Does Not Contain
    2. Fill in the dialog box as shown below.

    It will generate code similar to this:

     

    =Table.SelectRows(#"Changed Type", each not Text.Contains([ID], "Ending Balance for Period") and not Text.Contains([ID], "GL JE Name"))

     

     

  • Anonymous's avatar
    Anonymous
    Not applicable
    Remove Rows Using Power Query
    1. This will open up the Power Query Editor.
    2. Go to Home > Reduce Rows > Remove Rows > Remove Top Rows.
    3. Go to Home > Reduce Rows > Remove Rows > Remove Bottom Rows.
    4. Go to Home > Reduce Rows > Remove Rows > Remove Alternate Rows.