Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
TomBond77
Specialist
Specialist

Nested aggregation problem

Hi experts

How do we script this challenge? the code below gives "nested aggregation not allowed":

Sum({<[days]={">-6<1"}, [Year]={$(=max([Year]))}>} Count([ID])) / Count([ID])

Thanks for any advice

Tom

1 Reply
marcus_sommer

You need an aggr() for it. Something like this:

sum(aggr(count(ID), Dim1, Dim2)) / count(ID)

whereby Dim1, Dim2 are placeholder for the dimension in which context the calculation should happens - usually all dimensions from the object.

- Marcus