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

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Max

Hello all,

I have some names of countries and I have a profit per country.

Now I want a separate text box which show in which country  I earn most profit.

How can I do that?

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Or might be

FirstSortedValue(Country,  -Aggr(SUM(Profit),Country)

View solution in original post

3 Replies
Clever_Anjos
Employee
Employee

Try

FirstSortedValue(Country, - SUM(Profit))

MK_QSL
MVP
MVP

Or might be

FirstSortedValue(Country,  -Aggr(SUM(Profit),Country)

Not applicable
Author

Hi Lieko,

Try like this.....

Max(Aggr(sum(profit),country))

or

FirstSortedValue(Country, -sum(Profit))