Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
TomBond77
Creator III
Creator III

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