What I have
2 sheets: stats
and data
In data
sheet I have a table:
code | amount | date
xxx | 1.00 € | 10/05/2021 16:37:23
yyy | 3.00 € | 01/06/2021 16:37:23
xxx | 2.00 € | 10/06/2021 16:37:23
yyy | 3.00 € | 10/06/2021 16:37:23
Let’s assume that each row is a transaction.
For the calculations I noticed that the format of the col date might be harder but if it’s not possible or it’s too hard, I can split it in two cols: one for the date
and one for the hour
.
What I want
In stats
sheet I want to have tables with:
-
Total amount (sum of col
amount
of sheetdata
) -
Total amount by week (sum of col
amount
of sheetdata
grouped by datecol
) -
Total amount by month (sum of col
amount
of sheetdata
grouped by datecol
) - Total transactions by week
- Total transactions by month
-
Total amount grouped by code (sum of col
amount
of sheetdata
grouped by col code) -
Total amount grouped by code and by month (sum of col
amount
of sheetdata
grouped by col code) - Total transactions grouped by code and by month
In this example I would end up with:
- Total: 6 €
- Week of MAY with a total of 1 €. Week 1 of JUNE with a total of 3€ and week 2 with a total of 5€.
- Month of MAY with a total of 1 €. Month of JUNE with a total of 8.
- Week of MAY with a total of 1 . Week 1 of JUNE with a total of 1 and week 2 with a total of 2.
- Month of MAY with a total of 1 . Month of JUNE with a total of 3.
- Code xxx with a total of 3 €. Code yyy with a total of 6€.
- For MAY we have the code xxx with a total of 1 €. For JUNE we have xxx with a total of 2€ and yyy with a total of 6€.
- For MAY we have xxx with 1 . For JUNE we have xxx with 1 and yyy with 2.
I tried to follow the accepted answer of this other question that uses the SUMPRODUCT()
but it’s giving me error.
Pls find the document prepared attached.demo.ods