Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
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
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

Highlighted
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,

Highlighted
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


Highlighted
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