Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

How show Top Ranked Salesperson in a column?

I'm using a straight table with customer dimension on the left side.

I would like to write an expression that shows the Salesperson with the highest sales to that customer.

Ideally, I'd like to create an expression which shows the name, then another column/expression to show the percent of total customer sales that Salesperson is responsible for.

Thanks in advance!

4 Replies
montubhardwaj
Valued Contributor

How show Top Ranked Salesperson in a column?

Hi,

when you put Customer as Dimension and Sales as expression, then the total sales will be divided based on Customer. So add another Dimension say SPName(sales person name). Then in the expression,write somethingn like Max( AGGR(Sales,SPName)). This will give the Highest sales of a salesperson to a Customer.

Regards,

Dinesh Sharma

singhpooja
Contributor III

Re: How show Top Ranked Salesperson in a column?

Hi,

Go to chart properties-->Dimension Limits-->click on (which value are displayed using the first expression)-->

show only--> set your value as largest.

Thanks,

galax_allu
Valued Contributor

Re: How show Top Ranked Salesperson in a column?

Hi

try this

Aggr(Rank(Sum(customersales)),Salesperson)<=2 ....for top  2


Aggr(Rank(Sum(customersales)),Salesperson)<=3 .... for top 3




or simply

Aggr(Rank(Sum(customersales)),Salesperson)           ..... for all ranks


pandunallani
Contributor II

Re: How show Top Ranked Salesperson in a column?

HI,

In straight table use the following code in dimension level, expression contains total sales.

=if(aggr(rank(sum(Sales)),Country,Salesman)=1,Salesman)

Regards

Pavan N