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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
karin_nevo
Contributor III
Contributor III

Dimension Limit

HI,

I have stacked Bar chart with 2 dimensions: Year and Type.

I would like to display the largest 5 Types for each year (stacked bar).

I tried to use Dimensions Limits on Type field with 'Global Group Mode',but I get incorrect results.

I also tried to use Rank function:

if(aggr(rank(count(distinct EMP_ID)),Type)<=5,Type)

But I was unable to change it to include Aggr for year and Type. With the current expression, the Type is evaluated for the entire chart and not per year.

thanks,

Karin

17 Replies
antoniotiman
Master III
Master III

Hi Karin,

sort is per chart.

TOTAL AN, TOTAL QQ, TOTAL GG, ....

Regards,

Antonio

karin_nevo
Contributor III
Contributor III
Author

I didn't understand your reply.

I need for each year to sort by type (highest to lowest).

Also, do you know why the set analysis to ignore year doesn't work here?

antoniotiman
Master III
Master III

There's no way.

Sort is evaluate per Chart (Sum of all Year/Type selected)

karin_nevo
Contributor III
Contributor III
Author

I understand, thanks...

I have another question, instead of counting employees, I am using:

count(distinct EMPNUM)/count(distinct Total <Year>EMPNUM))

to show the precentage of each type per year.

is there a way to show 'Others' as a sum of all types that are ranked higher than 5?

I would like all columns to end at the same line (similar to the top chart in the QVW file)

antoniotiman
Master III
Master III

See Attachment Sheet 'Foglio1'

Regards,

Antonio

karin_nevo
Contributor III
Contributor III
Author

This solution doesn't display the correct data.

For example - in 2016: if no year is selected HH (6.58%) is missed in the list.

It has the same problem that I used in my original file

antoniotiman
Master III
Master III

See Attachment

karin_nevo
Contributor III
Contributor III
Author

Great, thank you so much for your help!