Seeking assistance regarding how to structure a query that will be processing data from multiple sheets (ie tabs), however both sheets have different data structure.
The first query (below) queries a tab that contains all of my expenses itemised. This sums them by month. =query(Expense_Data, "SELECT C, SUM(Q) where T Matches 'Expense' GROUP BY C ORDER BY C desc limit 3 label SUM(Q) 'Expenses'",1)
Example Data Output Below
Date | Expenses |
---|---|
01/01/2021 | -$1000 |
01/02/2021 | -$1500 |
01/03/2021 | -$1000 |
What I am seeking is to query another sheet which contains data (located in column G) that I wish to return based upon the date returned from the first query (located in column A), which I will then calculate the difference between. My issue is associating the 2 data sets together. Any support would be greatly appreciated!
Date | Expenses | Budget | Difference |
---|---|---|---|
01/01/2021 | -$1000 | -$2000 | -$XXXX |
01/02/2021 | -$1500 | -$1500 | -$XXXX |
01/03/2021 | -$1000 | -$1500 | -$XXXX |