Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have this in dimension for stack bar.
=AGGR(sum(NUMBER) ,CLASS ,MONTH)
then in expression i have,
COUNT(AGGR(sum(NUMBER) ,CLASS ,MONTH))
the result of dimension will be 0, 1, 2.
the expression is couting, how many of 0, how many of 1, and 2.
couting is fine, but when i turn it to percentage, it wont work.
i have tried relative, etc... i need to get the sum of the count, but with the aggr in dimension always showing, i can't get the total.
i have also tried to split the count, but there's no result
if( (AGGR(sum(NUMBER) ,CLASS ,MONTH))=0, count(AGGR(sum(NUMBER) ,CLASS ,MONTH)) )+
if( (AGGR(sum(NUMBER) ,CLASS ,MONTH))=1, count(AGGR(sum(NUMBER) ,CLASS ,MONTH)) )+
if( (AGGR(sum(NUMBER) ,CLASS ,MONTH))=2,count(AGGR(sum(NUMBER) ,CLASS ,MONTH)) )
any hints?
Thanks,
Woohoo! After about 6 attempts I got a post past the bloody moderator rules! It seems your full field name for CLASS sets off alarms!
Fuller explanation coming once it gets approved...
Just thinking out loud really - need to test it, but could you divide by the same Aggr() without one of the dimensions in it? Or maybe use TOTAL in the denominator expression.
yup.. i tried all those possible ways i could think of... and i'm still thinking ...
Can you post your app?
Hi Jason,
here is it, instead of showing count figures. i am trying to make 100% stacked bar chart. normally it's easy. but with aggr in dimension, it becomes tricky.. for me...
thanks for your help.
Will take a look this evening when I get back mate.
Hi Nick,
Sorry - I only got to look at this this morning. Your expression (and dynamic dimenasion) aggregate over MONTH and CLASS. You have MONTH as a dimension, therefore your divider needs to be a TOTAL count of CLASS. Try this:
COUNT(aGGR(sum(FP_NB_COUNTER) ,PC_CLASSI_LABEL,MONTH_YEAR))/COUNT(TOTAL DISTINCT PC_CLASSI_LABEL)
Seems to work.
Hope this helps,
Jason
Does everything I type need moderator approval!?
I guess not...
Divide your expression by:
COUNT(TOTAL DISTINCT PC_CLASSI_LABEL)