Discoverer Calculation Help [message #298748] |
Thu, 07 February 2008 08:21 |
daibatzu
Messages: 36 Registered: September 2007
|
Member |
|
|
Hello, I have this calculation in my discoverer spreadsheet:
SUM(Total Volume SUM) OVER(PARTITION BY Product Short Name,Mkt Short Name ORDER BY Rpt Period ROWS UNBOUNDED PRECEDING )
Basically it is summing up the Total Volume for all preceding months. But I want to change the behavior a bit. If for example, I choose the period Feb-08 it would sum up the Total Volume not just for Jan-08 and Feb-08, but also for Dec-07, Nov-07 e.t.c.
I don't want to make it this way. I only want to sum up for the current year, i.e if I choose Feb-08, sum up for only Jan-08 and Feb-08. If I choose Dec-07, sum up for only Dec, Nov, Sep e.t.c 07 (i.e as many months that have records for 2007). How do I do this. The rows unbounded preceding worries me a bit. Thanks.
|
|
|
Re: Discoverer Calculation Help [message #300148 is a reply to message #298748] |
Thu, 14 February 2008 07:31 |
skooman
Messages: 913 Registered: March 2005 Location: Netherlands
|
Senior Member |
|
|
What you are looking for is called a year to date, this can be done by including the year in the partition.
Don't worry about the unbounded preceding, that's the default (you can remove it) and only means "start calculating at each first occurence within the partition".
|
|
|
|
Re: Discoverer Calculation Help [message #301864 is a reply to message #298748] |
Fri, 22 February 2008 01:19 |
daibatzu
Messages: 36 Registered: September 2007
|
Member |
|
|
Wow, something I just noticed. I have calculations in Oracle Discoverer Desktop edition. When I move them over to Discoverer plus they are not working in the same way. The calculations are wrong. I wonder why something like this would happen and if anyone else has had this kind of problem.
|
|
|
|