Is it possible to concatenate the value from a column with a string in Google Query Language? I'd like to do something like this:
=QUERY('Business Income'!A1:E, "select 'Q' + quarter(A), sum(B) where A is not null group by 'Q' + quarter(A) label quarter(A) 'Quarter', sum(B) 'Income'")
Using data that looks like this:
Date Amount
---------- -------
01/01/2015 XXXX.XX
02/01/2015 XXXX.XX
03/01/2015 XXXX.XX
04/01/2015 XXXX.XX
05/01/2015 XXXX.XX
...
And I'd expect this for the output:
Quarter Income
------- ---------
Q1 $XXXXX.XX
Q2 $XXXXX.XX
Q3 $XXXXX.XX
Q4 $XXXXX.XX
Use format.
select quarter(A), sum(B)
where A is not null
group by quarter(A)
label quarter(A) 'Quarter', sum(B) 'Income'
format quarter(A) 'Q#'
Sorry for being late...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With