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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
tsbrian
Contributor II
Contributor II

Sorting Stacks in Stacked Bar Chart

Hi

I have a stacked bar chart with 2 dimensions (YearMonth, Job Type) and 1 measure (Jobs Count). As there are many job types and I want to limit the job type by Top 5 and also i need to sort the stacks(Job Type) in descending order. I am not able to achieve this. Need help on this please.

Thanks

Vijay

Labels (1)
  • SaaS

1 Solution

Accepted Solutions
sidhiq91
Specialist II
Specialist II

@tsbrian  Please use the below expression to the top 5

if(Aggr(rank(sum(jobcount)),Month,Jobtype)<=5,Jobtype)

And to sort the job type:

sidhiq91_0-1689010003020.png

If this resolves the issue, please like and accept it as a solution.

View solution in original post

1 Reply
sidhiq91
Specialist II
Specialist II

@tsbrian  Please use the below expression to the top 5

if(Aggr(rank(sum(jobcount)),Month,Jobtype)<=5,Jobtype)

And to sort the job type:

sidhiq91_0-1689010003020.png

If this resolves the issue, please like and accept it as a solution.