Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
maxgro
MVP
MVP

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'

)))

View solution in original post

2 Replies
maxgro
MVP
MVP

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
Author

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