Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Aggr and ignoring selections

Hi,

I have a problem - the aggr function does not EVER take into account elements of the dimension excluded by some other selection.

I need to distribute the client count into ranges like '0%', '10%, '>10%'. These ranges represent the part of the selected Asset Class inside the client portfolio.

So, if I select Equity as the Asset Class, I want to see how many clients have 10% (or 0, or >10%) of their portfolio in Equity.

My chart contains a dimension - an aggr similar to this:

=Aggr(

    if( sum(CBV) / sum({$<Assets.Class=>} Total<ClientID> CBV) <=0,

          '0%',

    if( sum(CBV) / sum({$<Assets.Class=>} Total<ClientID> CBV) <=0.1,

          '10%',

          '>10%'

    )),

    ClientID

)

Then in the expression it simply does count(ClientID).

The total chart count of clients should be equal to the actual total of clients.

But it is not: when the Assets.Class gets selected, some (or sometimes many) clients get obviously excluded.

So, the chart total sometimes gives 1, sometimes 100, sometimes 45 out of 100 clients.

Can this be solved so that the missing clients would be treated as having 0% of the asset class?

The actual problem is: can the Aggr function do the calculation on ALL the values of the filtered dimension?

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Stupid me.

Count({$<Assets.Class=>} ClientID)

in the expressions solves the problem.

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Stupid me.

Count({$<Assets.Class=>} ClientID)

in the expressions solves the problem.