Qlik Community

Qlik Education Discussions

Discussion Board for collaboration related to Qlik Education.

Not applicable

Populate field based on rank expression

I am looking to set the value of one field based on the output of a rank expression. For example, if I have total sales by sales person, and I rank those sales from highest to lowest, I want to populate a field (SalesLevel) based on that ranking. The top three would be "Gold Level", the next seven would be "Silver Level", the next 10 would be "Bronze Level"

1 Solution

Accepted Solutions
MVP
MVP

Re: Populate field based on rank expression

maybe, in a chart with salesperson as dim, this expression

if(rank(sum(Sales),4)<=3, 'Gold',

if(rank(sum(Sales),4)<=10, 'Silver',

if(rank(sum(Sales),4)<=20, 'Bronze',

'nothing'

)))

2 Replies
MVP
MVP

Re: Populate field based on rank expression

maybe, in a chart with salesperson as dim, this expression

if(rank(sum(Sales),4)<=3, 'Gold',

if(rank(sum(Sales),4)<=10, 'Silver',

if(rank(sum(Sales),4)<=20, 'Bronze',

'nothing'

)))

Not applicable

Re: Populate field based on rank expression

That gives me what I was looking for. Thank you for your quick response.

Community Browser