Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
nikhilgarg
Specialist II
Specialist II

HOw to achieve first top values ??

HEy,

How to get top 5 items according to sales wise(item with maximum sales at top and so on).

How to achieve this ?

Thanks

7 Replies
its_anandrjs

Hi,

For Top 5 use Rank function ad calculated dimension

Ex:_

Dim:-  =If(Aggr(Rank(Sum(Sales)) <= 5, Customer),Customer)

Expr:- Sum(Sales)

Regards

Anand

maleksafa
Specialist
Specialist

if(rank(sum(Sales)) <= 5, sum(Sales))

its_anandrjs

Hi,

Check this example

Data:

LOAD * INLINE [
Item, Sales
A, 25698
B, 24823
C, 2624
D, 236645
E, 2365
F, 22666
G, 245598
H, 2258
I, 226336
J, 22689
K, 222223
L, 112121
M, 213215
N, 123121
]
;


In straight table chart

Dim:- =If(Aggr(Rank(Sum(Sales)) <= 5,Item),Item)

Expre:- Sum(Sales)


Regards

Anand


kiranmanoharrode
Creator III
Creator III

Hi Nikhil,

Go to chart Preperties -> Dimension Limits -> Select Item Field from List of Dimensions -> Check the Check Box (Restrict which values are displayed using the first expression) -> select radio box (Show Only) -> Select Largest from Drop down select -> enter 5 in input box

By above procedure you will get required output mentioned above...

Regards,

Kiran

Anonymous
Not applicable

Hi,

Try  Calculated Dimension for displaying Top 5 records:

=aggr(If(RANK(aggr(sum(Sales), Customer)) <= 5, Customer) , Customer)

or

Goto Object Properties of Chart

Click "Dimension Limits"

Click "Restrict which values are displayed using the first expression"

Show only "Largest" 5 values and Click "OK"

Regards

Neetha

nikhilgarg
Specialist II
Specialist II
Author

Hey,

What is the difference between your Calculated dimension and following calculated dimension ??

If(Aggr(Rank(Sum(Sales)) <= 5,Item),Item)

Anonymous
Not applicable

Hi,

There is no much difference between  both the expressions,it's just i have grouped the sales amount based on dimension and calculated sum of sales to derive Top N Records.

Regards

Neetha