Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a monthly sales data that do a sum for each day.
I want to do a sum of the whole month and disregard the daily sums.
Can I do it without deleting those lines from the data?
Assuming you have a data similar to this
TRANSACTIONS:
Sales date | Sales amount |
2020-01-30 | 1300 |
2020-01-31 | 1310 |
2020-02-01 | 2010 |
2020-02-02 | 2020 |
Then you could do this.
LOAD
MonthName([Sales date]) as [Sales month],
[Sales amount] as [Sales amount]
FROM Transactions;
You will still have all rows in your table, but you will be able to present sum([Sales amount]) per Month.
Assuming you have a data similar to this
TRANSACTIONS:
Sales date | Sales amount |
2020-01-30 | 1300 |
2020-01-31 | 1310 |
2020-02-01 | 2010 |
2020-02-02 | 2020 |
Then you could do this.
LOAD
MonthName([Sales date]) as [Sales month],
[Sales amount] as [Sales amount]
FROM Transactions;
You will still have all rows in your table, but you will be able to present sum([Sales amount]) per Month.