Skip to main content
Announcements
Global Transformation Awards submissions are open! SUBMIT YOUR STORY
cancel
Showing results for 
Search instead for 
Did you mean: 
danialier
Creator III
Creator III

Text Box showing the name of the company with highest revenue

Hello,

I have the attached QV document with two text boxes: one for the company names and another one for the revenue of each company.

I want to create a third text box showing only the name of the company with highest revenue. Then, as soon as I will add more companies in the QV document I always want this third box to show the name of the company with the highest revenue.

Do you know how to do that ?

Thanks,

dani

1 Solution

Accepted Solutions
Gysbert_Wassenaar

=firstsortedvalue(aggr(concat(COMPANY,', '),REVENUE),-aggr(max(REVENUE),REVENUE))


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar

=FirstSortedValue(COMPANY, -REVENUE)


talk is cheap, supply exceeds demand
danialier
Creator III
Creator III
Author

Great !!! Thanks Gysbert ! That works now !

danialier
Creator III
Creator III
Author

One more question...

In case the highest revenue is the same for two companies, what I need to do to make sure than the third text box displays the name of the two companies then ?

thanks,

dani


Gysbert_Wassenaar

=firstsortedvalue(aggr(concat(COMPANY,', '),REVENUE),-aggr(max(REVENUE),REVENUE))


talk is cheap, supply exceeds demand
danialier
Creator III
Creator III
Author

Thanks !