Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for 
Search instead for 
Did you mean: 
aaronnayan
Creator III
Creator III

Set anlaysis

Hi Guys

How would i show which City as a Value has the highest sales ?

Not the sales number

1 Solution

Accepted Solutions
sunny_talwar

May be this

FirstSortedValue(City, -Aggr(Sum(Sales), City))

or

Concat(Aggr(If(Sum(Sales) = Max(TOTAL Aggr(Sum(Sales), City), City), City), ', ')

View solution in original post

7 Replies
shraddha_g
Partner - Master III
Partner - Master III

FirstSortedValue(City , Sum(Sales))

aaronnayan
Creator III
Creator III
Author

I need it to show the city that has the highest sales

agigliotti
Partner - Master III
Partner - Master III

what object type are you using?

aaronnayan
Creator III
Creator III
Author

KPI

agigliotti
Partner - Master III
Partner - Master III

maybe this:

=Only( Aggr( if( Sum(Sales) =  Max( total Aggr( Sum(Sales), City) ), City, Null() ), City) )

sunny_talwar

May be this

FirstSortedValue(City, -Aggr(Sum(Sales), City))

or

Concat(Aggr(If(Sum(Sales) = Max(TOTAL Aggr(Sum(Sales), City), City), City), ', ')

mark6505
Partner - Master
Partner - Master

Hi Aaron,

Try something like

IF(RANK(AGGR(SUM(SALES),CITY) = 1,ONLY(CITY))

Mark