Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
richnorris
Creator II
Creator II

Work out the highest earning salesperson for a given client

This seems like it should be such a simple task, maybe my brain has melted, but I'm trying to find the highest earning salesperson, given a list of top clients, to show as an expression next to it.

Im currently looking at



if(sum([$(vCurrency) Volume]) = aggr(Rangemax(sum([$(vCurrency) Volume])),[Sales Client]),[Salesperson])

but this isn't quite getting me there... anyone got any ideas? Thanks!

2 Replies
richnorris
Creator II
Creator II
Author

I have one dimension that is the top 100 sales clients. If I then add an expression that is '

if



(sum([$ Volume]) = rangemax([$ Volume]), [Salesperson]) '

it fails.

If I dont have the top 100, but just all the sales clients, then it works fine. Whats going on here?

pover
Luminary Alumni
Luminary Alumni

Have you tried the Rank() function?

Rank(sum([$(vCurrency) Volume]))

You would need to have Customer and Salespersons as dimensions in a table.

Or how do you want the report to look like?

Regards.