Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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
Partner - Champion III
Partner - Champion III

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


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

=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
Partner - Champion III
Partner - Champion III

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


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

Thanks !