Forum Discussion

dd88's avatar
dd88
Icon for Post Patron rankPost Patron
2 years ago
Solved

Data to not include blank rows

Excel spreadsheet is the data source. To make it easy for the users to enter data, I created an area with borders around the cells. This is the area for users to enter data. I than created a Table Na...
  • OwenAuger's avatar
    2 years ago

    Hi dd88 

    I would recommend using the "Remove Blank Rows" function in the Power Query interface.

    Home > Remove Rows > Remove Blank Rows

     

    This is translated into M code looking like this

     

    = Table.SelectRows(YourTable, each not List.IsEmpty(List.RemoveMatchingItems(Record.FieldValues(_), {"", null})))

     

    which keeps only rows containing at least one value that is neither an empty string nor null.

     

    Does this work for you?

    Regards