Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is it possible to show top ranked salesperson in text box in sense?

=only(if(aggr(Rank(Sum([Quantity]),4),SalesPersonName)=1,SalesPersonName))

Above expression works in QV but not in QS. Does anyone know if there is a work around here...

5 Replies
sunny_talwar

May be try this:

=FirstSortedValue(SalesPersonName, -Aggr(Sum(Sales), SalesPersonName))

Not applicable
Author

Nothing.

I imagine this has something to do with Qlik Sense not realizing that this is one unique value and instead just throws a null output out.

swuehl
MVP
MVP

Your original expression seems to work for me in QS.

Have you tried also

=Concat(DISTINCT if(aggr(Rank(Sum([Quantity]),4),SalesPersonName)=1,SalesPersonName))


to check if there is an issue with Only()?

sunny_talwar

May be add a DISTINCT:

=FirstSortedValue(DISTINCT SalesPersonName, -Aggr(Sum(Sales), SalesPersonName))

Not applicable
Author

Hey guys,

Was working with a new data set, and just looked a bit deeper and realized that the reason I was getting a null output was because in fact the salesperson with the largest volume was null

Thanks for the responses,

DevKev