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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to limit top 10 by a measure not used in chart

I created a bar chart on Customers by Profit but I want to limit the chart to just show top 10 customers by Revenue (which is not used in chart). Any idea how to do that?

Thanks in advance.

1 Solution

Accepted Solutions
agigliotti
Partner - Champion
Partner - Champion

I think you should create a calculated dimension.

ex. Aggr( if( Rank(Sum(Revenue)) <= 10, Customer, null() ) )  and uncheck "Include null values" checkbox under dimension.

View solution in original post

5 Replies
agigliotti
Partner - Champion
Partner - Champion

I think you should create a calculated dimension.

ex. Aggr( if( Rank(Sum(Revenue)) <= 10, Customer, null() ) )  and uncheck "Include null values" checkbox under dimension.

qv_testing
Specialist II
Specialist II

My bad, your right Andrea .

Anonymous
Not applicable
Author

Hey I am getting an error in expression. Error says Aggr takes at least two parameters.

Anonymous
Not applicable
Author

That was really helpful. This thing worked for me. Thanks,

Aggr(if(Rank(Sum(Revenue)) <= 10, Customers, null()),Customers)

premacharya0903
Contributor II
Contributor II

This is great , i can also get the other values clubbed into others , However , how can i sort the values by Revenue in such a way that 'Others' would always be the last bar.