I am trying to have a single formula where I can continue to have queries added to it to have different criteria and sorting algorithms. The results would have different sizes but all be coming from the same sheet. Here is what I was trying:
=ARRAYFORMULA(IFERROR({iferror(QUERY(Available!$A$3:$M, "select A,B,C,D,E,F,G,H,I,J,K,L,M where M like '%Blah' order by B desc");iferror(QUERY(Available!$A$3:$M, "select A,B,C,D,E,F,G,H,I,J,K,L,M where C = 'Bleh' order by B asc limit 3"),A2:M2/0)})))
In the example above, the first query would look at a sheet and find a set of columns where column M contains "Blah", order it and provide the results. This works fine. When I add the 2nd query, I want it to append the results to the previous query. I want to have the ability to keep building on this formula, so I can have added more queries in the future that are independently sorted and limited. In the 2nd query, I only want 3 of the results that are ordered in reverse and have column C read "Bleh."
Figured it out. It was a syntax issue using a simpler example. I was able to get it working using this:
={QUERY(Available!$A$3:$M, "select A,B,C,D,E,F,G,H,I,J,K,L,M where M like '%Blah' order by B desc");QUERY(Available!$A$3:$M, "select A,B,C,D,E,F,G,H,I,J,K,L,M where C = 'Bleh' order by B desc")}
Originally I had tried this, but was using ,
as the separator which is used for combining ranges using the columns. In order to use rows to combine the ranges you need to use the ;
as the separator.