
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nested aggregation error
Dear all,
I am getting the error "nested aggregation not allowed" for the following expression...
RANGESUM(ABOVE(SUM({$<[CALENDARIO.Anno]= {$(=Year(Today()))}>} TOTALE_VOCE-(sum({$<[CALENDARIO.Anno]= {$(=Year(Today()))}>} COSTO_PAGHE))),0,RowNo()))/
(SUM({$<[CALENDARIO.Anno]= {$(=Year(Today()))}>} TOTALE_VOCE)-SUM({$<[CALENDARIO.Anno]= {$(=Year(Today()))}>} COSTO_PAGHE))
...my head is exploding 😫
Thanks for your support
Mauro

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
RANGESUM(ABOVE(SUM({$<[CALENDARIO.Anno]= {$(=Year(Today()))}>} TOTALE_VOCE-...
should be
RANGESUM(ABOVE(SUM({$<[CALENDARIO.Anno]= {$(=Year(Today()))}>} TOTALE_VOCE)))-...
and each subsequent function needs its own RangeSum with Above & RowNo. RangeSum is an aggregation function therefor cannot have other aggregations nested inside.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>> RangeSum is an aggregation function therefor cannot have other aggregations nested inside.
Not true. RangeSum() is not an aggregation function. It merely sums its parameters, and Above() returns some values to sum.
The problem is a misplaced parenthesis. i think what you meant was:
RANGESUM(
ABOVE(
SUM({$<[CALENDARIO.Anno]= {$(=Year(Today()))}>} TOTALE_VOCE) -
SUM({$<[CALENDARIO.Anno]= {$(=Year(Today()))}>} COSTO_PAGHE)
, 0, RowNo())
)
/
(SUM({$<[CALENDARIO.Anno]= {$(=Year(Today()))}>} TOTALE_VOCE) -
SUM({$<[CALENDARIO.Anno]= {$(=Year(Today()))}>} COSTO_PAGHE))
With complex expressions like this, save your head by laying them out like the above so that you can see what is going on.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
