Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 1 | startdate | enddate | Sum( {$<Date = {“>=$(=Only(StartDate))<=$(=Only(EndDate))”} >} InvoiceAmount) | Only(Startdate) |
---|---|---|---|---|
A1 | 17/01/2013 | 31/12/2013 | - | 17/01/2013 |
A2 | 18/02/2013 | 31/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
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))
try this way
Sum( {$<Date = {“>=$(=date(StartDate))<=$(=Date(EndDate))”} >} InvoiceAmount)