3 Replies Latest reply: May 21, 2012 2:33 PM by Phaneendra Kunche

# total of top 5 rows--pls help

Dear all,

Please help me on calculation of sumof top 5 rows from a set of records.Ex:I have Division and Balance.

I need to display the sum of top five balance, and the balance for rest of the divisions, something like .

 Sum of   top 5 divisions Value(sum (BALANCE)) Others Value(sum(BALANCE))

I am writing expressions (for sum top 5)  as - if(Division = 'Sum of top 5 divisions', sum(if( rank(aggr( sum(BALANCE),DIVISION),4)<6,)...but this is not working..Please help me with the expressions

Thanks,

Sonika

• ###### Re: total of top 5 rows--pls help

Hi,

See if attached helps.

=IF (aggr(rank( sum(BALANCE) ,0) , DIVISION )<= 5 , 'Sum of Top 5 Divisions' ,'Others')

Regards

Phani

• ###### total of top 5 rows--pls help

The dimensions - Sun of top 5 and Others, am  creating using inline table. Please help me on writing expressions for the values.

• ###### Re: total of top 5 rows--pls help

Can you throw a sample what you are trying to acheive..