Skip to main content
Announcements
Happy New Year! Cheers to another year of collaboration, connections and success.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

trying to rank a variable and return the string associated with the top ranked variable

Hi

I am having some issues when trying to rank a variable and return the string associated with the top ranked variable!

I have created a cross table bringing in the client ID, bank and bank data!  Is there a way of ranking/sorting these to allow me to pull the most popular bank name into a text box without having to create a huge IF statement comparing the sum of each bank with all the rest of the banks?(of which there are many)!

Does any one have any ideas?

Thanks

Peter

1 Solution

Accepted Solutions
stigchel
Partner - Master
Partner - Master

You can use the rank function, something like

=Concat(Aggr(if(Rank(Sum(BankData))=1,Bank),Bank),' / ')

I've also used Concat, as there can be more then one Bank with the same outcome

View solution in original post

2 Replies
stigchel
Partner - Master
Partner - Master

You can use the rank function, something like

=Concat(Aggr(if(Rank(Sum(BankData))=1,Bank),Bank),' / ')

I've also used Concat, as there can be more then one Bank with the same outcome

Not applicable
Author

Thanks for that Piet, it works perfectly!