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: 
Anonymous
Not applicable

Rank Function

I have a issue that I have not been able to find a work around for.  I am trying to populate a text box with the rank of a sale person relative to the total sales person population.  To do this I have been using AGGR with Rank in the formula below.  This works fine until I filter by a product where the sales person has not sold anything.  In those cases it is returning "-" in the text box.  Ideally it would treat no sales as $0 sales and return the appropriate rank.

Any insight would be greatly appreciated.

=Aggr(Rank(Sum({_MTDFlag={1},SalesPerson=>}Sales),1,1),SalesPerson)

Selections

Salesperson List Box

    - Salesperson A

Sum Result

Sum({_MTDFlag={1},SalesPerson=>}Sales)

     -$0

Expected Result

46

Current Result

-

4 Replies
qlikviewwizard
Master II
Master II

Hi,

Can you attach sample qvw with the data. Thank you.

sunny_talwar

Does anything changes when you use this:

=Avg(Aggr(Rank(Sum({_MTDFlag={1},SalesPerson=>}Sales),1,1),SalesPerson))

Anonymous
Not applicable
Author

I have attached a simplified version of the data.

Thanks

Anonymous
Not applicable
Author

Unfortunately that did not work.  Thanks for the suggestion.