# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor II

## How to show top 5 and last 5 and middle 5 sales for partnerid's

Hi ,

I have data like Partner id wise sales values in straight table.But in this table i want see only top5 sales and bottom 5 sales and middle 5 sales with partnerid's.

Below is the straight table i have attached can you please explain how can i show above requirement matches.

Thanks,

Raj

1 Solution

Accepted Solutions
Valued Contributor II

## Re: How to show top 5 and last 5 and middle 5 sales for partnerid's

Hi Rajesh,

for Top 5 And bottom 5 Please find the attachment.

and explain the logic how you calculate middle 5 one.

Thanks,

Arvind Patil

4 Replies
Valued Contributor II

## Re: How to show top 5 and last 5 and middle 5 sales for partnerid's

Hi Rajesh,

for Top 5 And bottom 5 Please find the attachment.

and explain the logic how you calculate middle 5 one.

Thanks,

Arvind Patil

MVP

## Re: How to show top 5 and last 5 and middle 5 sales for partnerid's

You can find rank by the expression

=Rank(Aggr(Sum(Sales),PartnerID))

Top 5

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

Bottom 5

=If( Rank(Aggr(Sum(Sales),PartnerID)) >= 5, Sum(Sales))

Note:- How you can identify the middle 5 sales.

New Contributor II

## Re: How to show top 5 and last 5 and middle 5 sales for partnerid's

Thanks Anand..it's working fine

New Contributor II

## Re: How to show top 5 and last 5 and middle 5 sales for partnerid's

Thanks Arvind..it's working fine