Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Nested aggregate functions are not allowed

LucieneMay 6 2008 — edited May 7 2008
I need a calculation that divides a parcial value (based on a condition) by the total. It is something like that:

CALCULATION 1:
PARCIAL_VALUE = CASE WHEN DURATION >= :PARAMETER THEN MEASURE_VALUE ELSE 0 END

CALCULATION 2:
DIVISION = CASE WHEN MEASURE_VALUE = 0 THEN 0 ELSE PARCIAL_VALUE / MEASURE_VALUE END

Calculation 1 only works if I use a SUM before the CASE. If I don't use the SUM, the calculation doesn't aggregate.
I believe I also should add a SUM before the CASE of Calculation 2, but I can't. I got the error: Nested aggregate functions are not allowed.

I tried to merge the two calculations, but I got the same error. I also tried to create a calculated item in detail level in the Administrator, but it didn't work too.

How can I reformulate this calculation in order to avoid this error?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 4 2008
Added on May 6 2008
3 comments
2,473 views