Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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
MVP
MVP

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

May be try this:

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

Not applicable

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

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.

MVP
MVP

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

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()?

MVP
MVP

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

May be add a DISTINCT:

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

Not applicable

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

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