Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

How to keep all the rows where a specified column is empty

Hello,

When I select a column, I can go to the menu "Reduce the rows", then it presents me 2 options : keep rows / remove rows. Within "Remove rows", I have 6 options, including "remove empty rows". But within "keep rows", there are only 5 options and nothing linked to th eempty rows, why is that ?

Basically, I want a step that keeps all the rows where a specified column "xxx" has empty values. How can I do that please ?

  • Anonymous's avatar
    Anonymous
    3 years ago

    Ok, I did that but only "remove empty elements" was present, so I inversed the code and it is fine now :

    = Table.SelectRows(Source, each [xxx] = null or [xxx] = "")

3 Replies

  • HotChilli's avatar
    HotChilli
    Community Champion

    All GUI features are a front-end for a bit of code.  I presume MS will take a view on what they think is useful.

    For your case, I think you want to click on the dropdown on the relevant column header.  You can filter using one of the choices there.  You can also edit the code (once it's in the query steps) and change it if it doesn't quite meet your needs

    • Anonymous's avatar
      Anonymous
      Not applicable

      Ok, I did that but only "remove empty elements" was present, so I inversed the code and it is fine now :

      = Table.SelectRows(Source, each [xxx] = null or [xxx] = "")
  • edhans's avatar
    edhans
    Community Champion

    The Keep Rows and Remove Rows buttons are for the entire table, no column logic.

    Go to the column you are interested in and click the dropdown.

    Then you can apply some very specific logic with special filters (1) or by checking/unchecking things in the list (2)