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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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
MVP
MVP

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
MVP
MVP

what object type are you using?

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
aaronnayan
Creator III
Creator III
Author

KPI

agigliotti
MVP
MVP

maybe this:

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

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
sunny_talwar
MVP
MVP

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