Answer the question
In order to leave comments, you need to log in
How to withdraw (income) - expenses by month?
There are 3 sheets in the table. The first sheet where data arrives with the date and amount of the purchase. On the second sheet are the expenses with the date. And on the 3rd sheet you need to display net profit. I managed to find a formula that counts by months =QUERY(ARRAYFORMULA({TEXT(A2:A;"YYYY-MMmm")\F2:F});"select Col1,sum(Col2) where Col1<> '2021-12' " &"group by Col1 label Col1'Month',sum(Col2)'Sum'") But I don't understand how to subtract from sheet 2... Is there a solution at all? To be automatically considered? I need to make it so that a net result would be shown for a month
Answer the question
In order to leave comments, you need to log in
Try something like this
=INDEX(
QUERY(
{
'Заказы'!H3:I;
{'Заказы'!M3:M\-1*'Заказы'!N3:N}
};
"select Col1, sum(Col2)
where Col1<>'' and Col1<>'1899-12'
group by Col1
label Col1'Дата',sum(Col2)'Прибыль'"
)
)
-1*'Заказы'!N3:N
. Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question