# Third-Party Qlik Jobs

Highlighted
New Contributor

## Rank in title expression

Hi everybody, anybody knows how to give the rank of a value on the title?

Ex : Sales of 9 countries (below) , England is the 3rd. I  want to put on the bar chart title : "England 's ranking is the 3rd"

Country / Sales

France / 6

England / 10

New Zealand /13

Italy / 12

Spain /3

Portugal /7

USA /9

Australia /6

Japan / 5

Indonesia / 8

Thank you in advance for the precious help

1 Solution

Accepted Solutions
New Contributor II

## Re: Rank in title expression

Hi,

Is it Ctry England is always fixed and you want to show only the dynamic rank of England in your title?
If so, then you can use below expr.
='England ''s ranking is the '& aggr(if(CTRY='England',Rank(sum(Sales))),CTRY)&'rd'
Else if, your requirement is to always show third highest sales country then use below expr.
='Country having 3rd highest sales is -'& FirstSortedValue(CTRY, aggr(Rank(sum(Sales))=3,CTRY))
4 Replies
New Contributor II

## Re: Rank in title expression

Hi,

Is it Ctry England is always fixed and you want to show only the dynamic rank of England in your title?
If so, then you can use below expr.
='England ''s ranking is the '& aggr(if(CTRY='England',Rank(sum(Sales))),CTRY)&'rd'
Else if, your requirement is to always show third highest sales country then use below expr.
='Country having 3rd highest sales is -'& FirstSortedValue(CTRY, aggr(Rank(sum(Sales))=3,CTRY))
New Contributor

## Re: Rank in title expression

Hi PV, it's been 4 days since i was on this expression and you saved me!! Thank you so much it's working!!!

New Contributor

## Re: Rank in title expression

Hi PV, as I said previously thak so much for help it worked perfectly. The answer to your question was yes it's always England fixed but the second expression will help me anyway. Tell me, how can i had an other dimension eg City as a condition in the expression below?
aggr(if(CTRY='England',Rank(sum(Sales))),CTRY)
New Contributor II