Forum Discussion

pade's avatar
pade
Icon for Advocate III rankAdvocate III
9 years ago
Solved

Removing empty rows based on a subset of columns

I need to remove empty rows. This is quite easy, just choose "Remove rows", and then "Remove blank rows" from the meny. This will create the formula: = Table.SelectRows(#"Added Index", each not List...
  • pade's avatar
    9 years ago

    I must have done a typo when I tried my own solution

     

    Having a table (Table1) with columns C1, C2, C3, C4, C5. And you would like filter out the none empty rows based on columns C1, C2, C3, you can use the formula below:

     

    = Table.SelectRows(#"Table1", each not List.IsEmpty(List.RemoveMatchingItems(Record.FieldValues(Record.RemoveFields(_,{"C4", "C5"})), {"", null})))

     

    Fun to sometimes be able to answer your own questions...