Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
tzachi
Contributor
Contributor

Ignoring sum lines in the darabase

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?

1 Solution

Accepted Solutions
Vegar
MVP
MVP

Assuming you have a data similar to this

TRANSACTIONS:

Sales dateSales 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.


View solution in original post

1 Reply
Vegar
MVP
MVP

Assuming you have a data similar to this

TRANSACTIONS:

Sales dateSales 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.