Forum Discussion
queenbean84
Jul 12, 2023Copper Contributor
Income Statement by month using pivot table
I am trying to create an income statement by month for the attached file. It will not allow me to group by month. I also want to have a grand total for PROFIT OR (LOSS). Any help here would be app...
peiyezhu
Jul 12, 2023Bronze Contributor
How about based on this transaction sheet?
select regexp2('\/(\d+)\/',Date,1) month,Date,Description,iif(`Group`='Expense',-Amount,Amount) Amount,Category,Property,Unit,'Prifit' `Group` from Add_column_month_row_profit union all
select regexp2('\/(\d+)\/',Date,1) month,* from Add_column_month_row_profit;