Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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 - Champion
Partner - Champion

what object type are you using?

aaronnayan
Creator III
Creator III
Author

KPI

agigliotti
Partner - Champion
Partner - Champion

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

Mark_Little
Luminary
Luminary

Hi Aaron,

Try something like

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

Mark