Qlik Community

New to Qlik Sense

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

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
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
Partner

FirstSortedValue(City , Sum(Sales))

aaronnayan
Creator III
Creator III
Author

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

agigliotti
Partner
Partner

what object type are you using?

aaronnayan
Creator III
Creator III
Author

KPI

agigliotti
Partner
Partner

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), ', ')

View solution in original post

mark6505
Partner
Partner

Hi Aaron,

Try something like

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

Mark