Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Calculation between two query result Google Sheet

$
0
0

I have a sheet collecting bet results

Date% investmentoddswon
01/06/202121.12yes
01/06/202121.09no
02/06/202131.05yes

I thought creating query filtering if the bet has been lost or won could help but I am stuck

=QUERY(bets!A1:D;"select A, sum(B), sum(C), count(A) where D = 'yes' group by A")

With that I can have the victories with the some summary day by day.But this is not really what I want.

But the result I want is more complexThe initial bankroll amount is 100The result should be

Dateinvested %invested amountoutputbankroll
01/06/2021440.2496.24
02/06/202132.893.0396.38

I do not know if I can do that with Google Sheet formulas, or I will need to use a script.


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>