Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
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.