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: 
Not applicable

Aggregating sun based on two values

Hi all

I have a requirement where

Region  country  sales

Apac     ind          100

Apac      chn          90

Mena     eup         80

Mena     uk            40

I want to aggregate data based on region and country and show top values based on combination

I have to show in a single bar chart where

My dimension is region and sum of sales is expression

Output is as below

Region     sales

Apac   100

Mena   80

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be like this

Dimension

Region

Expression

Max(sales)

or

Max(Aggr(Sum(sales), Region, country))

View solution in original post

5 Replies
sunny_talwar
MVP
MVP

May be like this

Dimension

Region

Expression

Max(sales)

or

Max(Aggr(Sum(sales), Region, country))

Anil_Babu_Samineni
MVP
MVP

Try with Max(Sales)

OR Else Use Expression like

Aggr(Sum(Sales),Region)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
trdandamudi
Master II
Master II

One more way is as below:

Dimension:

Region

Expression:

FirstSortedValue(sales, -sales)

Not applicable
Author

Thank u so much sunny it worked

Not applicable
Author

count of values using group by

Hi Sunny can you please help me out in the above issue