Forum Discussion
dolphin18
1 year agoFrequent Visitor
How to remove rows ONLY based on specific column fields
Hello, I have a table where I want to be able to remove rows that have null/blank values but only for specific columns. Using the table below as an example, my table will always have an ID and Lo...
- 1 year ago
Hi dolphin18
Here's how I would do it:
Add a step with this code in the formula bar, where PreviousStep is the previous step in the query:
= Table.SelectRows( PreviousStep, each List.NonNullCount({[Quantity], [Due Date], [Description], [Order Date]}) > 0 )This selects rows where at least one of those four columns is non-null.
Does this work for you?
OwenAuger
1 year agoSuper User
Hi dolphin18
Here's how I would do it:
Add a step with this code in the formula bar, where PreviousStep is the previous step in the query:
= Table.SelectRows( PreviousStep, each List.NonNullCount({[Quantity], [Due Date], [Description], [Order Date]}) > 0 )
This selects rows where at least one of those four columns is non-null.
Does this work for you?
dolphin18
1 year agoFrequent Visitor
This worked! Thank you so much!!