QUERY drops every text value in a column that has both numbers and text QUERY
Column D has order references like 4471 and A-4472 mixed together. =QUERY(A:F, "select A, D where B = 'open'") returns the numeric ones fine and leaves blanks where the text ones should be. If I sort the sheet so text is at the top it flips and drops the numbers instead. Roughly 3000 rows. What is QUERY actually doing here?
@till_and_tally · 2mo ago · 2 replies
If you have the newer functions,
FILTERdoes not have this problem at all because it does not impose a column type.=FILTER({A:A, D:D}, B:B = "open")gives you both halves. You lose QUERY's sorting and grouping, but for a straight filter it is simpler and more predictable.Reply
Report
@listcomp_leo · 2mo ago
Good call, and I reach for FILTER first these days for exactly this reason. QUERY earns its keep on group by and pivot, not on plain where clauses.
Reply
Report