Renee Rattray
Renee Rattray

Reputation: 5

Create a query to remove rows with a 0 value

I'm sure this is probably a simple answer but I can't work out where I'm going wrong. I have a data table that I've copied to a new tab from (ForMaster!A511:G574). It brings in 7 columns data, the last 2 columns containing numerical values.

Sample Doc https://docs.google.com/spreadsheets/d/1zcIHvSM1V_rVH8uiRE1ZhQHkptJLLlw9gnumSurZOps/edit?usp=sharing

I've been trying to set up a query that would look at columns F & G and remove rows where there is a zero in both columns. Ultimately, I want rows that have a $value in either to remain. This is a live doc, so if a row initially has a zero, I'd like it to be visible if a value is added at a future date.

I've tried using =QUERY({ForMaster!A511:G574},"select * where Col6 >=0 or Col7 >=0"), but it doesn't eliminate any rows.

Please help.

Upvotes: 0

Views: 876

Answers (2)

player0
player0

Reputation: 1

try:

=QUERY(ForMaster!A511:G574; "where F+G <> 0"; 1)

enter image description here

Upvotes: 0

CMB
CMB

Reputation: 5163

The comparison should be only greater than 0 to eliminate rows with both zero values.

=QUERY({ForMaster!A511:G574},"select * where F>0 or G>0")

Sample Data:

enter image description here

Upvotes: 1

Related Questions