Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
comunico
Partner - Contributor III
Partner - Contributor III

Sum between date in table

Good morning all,

Can someone please help me with some syntax?

I have two fields named StartDate and EndDate and I need to sum the total amount of Value that falls into them and the selection in dates.

I try this

Sum( {$<Date = {“>=$(=Only(StartDate))<=$(=Only(EndDate))”} >} InvoiceAmount)

But this doesn't work in my table.

dim 1startdateenddate

Sum( {$<Date = {“>=$(=Only(StartDate))<=$(=Only(EndDate))”} >} InvoiceAmount)


Only(Startdate)
A117/01/201331/12/2013-17/01/2013
A218/02/201331/12/2014-18/02/2013






I need to select the year, for example 2013, but i want that my expression show the amount starting at 17/01/13 for first row and at 18/02/2013 for second row.

Can anyone help me, please?

Bye

2 Replies
Gysbert_Wassenaar

You'll have to use an if statement here. Set analysis calculates one set for the entire chart, not a set per row. Try sum(if(Date>=StartDate and Date<=EndDate, InvoiceAmount))


talk is cheap, supply exceeds demand
er_mohit
Master II
Master II

try this way

Sum( {$<Date = {“>=$(=date(StartDate))<=$(=Date(EndDate))”} >} InvoiceAmount)