6 Replies Latest reply: Dec 7, 2012 11:18 AM by Clever Anjos

# Counting based on acumulated %

I have a base with similar to this where the first column is "customer name" for example

 Dim4 V V% V%a Class i 12702 5,18% 5,18% 1 z 11917 4,86% 10,04% 1 k 11742 4,79% 14,82% 1 t 11657 4,75% 19,58% 1 j 11390 4,64% 24,22% 1 v 11222 4,58% 28,80% 1 q 10626 4,33% 33,13% 2 w 10226 4,17% 37,30% 2 p 10085 4,11% 41,41% 2 c 9926 4,05% 45,46% 2 m 9904 4,04% 49,50% 2 l 9680 3,95% 53,44% 3 h 9533 3,89% 57,33% 3 e 9493 3,87% 61,20% 3 x 9272 3,78% 64,98% 3 o 9221 3,76% 68,74% 3 g 8601 3,51% 72,25% 3 s 8576 3,50% 75,74% 3 r 8456 3,45% 79,19% 3 d 8278 3,38% 82,56% 4 { 8183 3,34% 85,90% 4 b 7887 3,22% 89,12% 4 n 7092 2,89% 92,01% 4 u 6837 2,79% 94,80% 4 f 6811 2,78% 97,57% 4 y 5954 2,43% 100,00% 4

I need to calculate a graph (not at load script) that shows

 <30% 6 3080% 7

Where I am counting how many customers falls below acumulated 30%, how many falls between 30% and 50% and so on.

Any ideas?

• ###### Re: Counting based on acumulated %

in the epressions u can write an if condition  and assign the

if (x <30,count(customers),

if(30<x<50 ,count(customers

..

try this

• ###### Re: Counting based on acumulated %

I need to develop another graph, that does not have Dim4 as a dimension.

• ###### Re: Counting based on acumulated %

Hi.

Your [V%a] and [class] columns, are they calculated in script or in chart ?

• ###### Re: Counting based on acumulated %

v%, v%a and Class are calculated at graph

v% = sum(Expression1)/sum(TOTAL Expression1)

v%a = RangeSum(above(Column(2),0,RowNo()))

and

class = if(column(3)<0.3,1,if(column(3)<0.5,2,if(column(3)<0.8,3,4))))

• ###### Re: Counting based on acumulated %

Hi.

You can create a chart with calculated dimension (used fractile as an example, rank() is also suitable):

aggr(

if(Sum(V)>=fractile(total aggr(Sum(V), Dim4), 0.8), dual('<30%', 0),

if(Sum(V)>=fractile(total aggr(Sum(V), Dim4), 0.6), dual('>=30%<50%', 0.3),

if(Sum(V)>=fractile(total aggr(Sum(V), Dim4), 0.26), dual('>=50%<80%', 0.5), dual('>=80%', 0.8))))

, Dim4)

The problem is I don't know how to calculate fractile parameter dynamicaly according to your percent criteria

As for expresison use just =Count(Dim4)

• ###### Re: Counting based on acumulated %

I´ll try smething like this