Search code examples
arraysgoogle-sheetsfiltermatchgoogle-query-language

Google Sheets Query Returns All Rows in One Row


I have a query formula setup to pull form data from another sheet in the same spreadsheet. For some reason, it is loading all the rows but in one row.

Went ahead and made a copy of my spreadsheet so the issue can be seen better

https://docs.google.com/spreadsheets/d/1iCIfdA7lg6DNzr6O-q7oLWeXCFgTxbrwBi4wYqR7hQw/edit?usp=sharing

How it should look is:

USD | Migros | 18.12

TRY | Kumru | 25

But is instead loading:

USD TRY | Migros Kumru | 18.12 25

I have another spreadsheet with an almost identical setup, but it loads the data in separate rows. Cannot figure out what is different here.


Solution

  • usually this happens when you skip 3rd query parameter. use:

    =QUERY(DATA!A2:J4000, "SELECT F,H,G WHERE J = 'October' AND B = 'Groceries'", 0)
    

    enter image description here