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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
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

1 Solution

Accepted Solutions
sunny_talwar

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

May be like this

Dimension

Region

Expression

Max(sales)

or

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

Anil_Babu_Samineni

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