Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
jchoucq
Partner - Creator III
Partner - Creator III

Smallest Dimension limits

HI everybody,

for example, i want to show the 5 smallest sales in a bar chart and when i use Smallest Dimensions Limits, the bar chart gives no data to display because many salesman have no sales !

Is it possible, in a bar char to have the 5 smallest values, which are different from zero.

Regards,

Johann

1 Solution

Accepted Solutions
Gysbert_Wassenaar

It works with as calculated dimension if(aggr(sum(MT_FACT),CODE_CLT)>0, CODE_CLT) and Suppress When Value Is Null checked. See attached example.


talk is cheap, supply exceeds demand

View solution in original post

11 Replies
MayilVahanan

HI

You can use rank() function for that,

for ex:

in expression

if(rank(sum(Sales)) < 5, sum(Sales))

greater than zero,

u can use like this

=if(rank(sum({<Sales = {'>0'}>}Sales)) <=5, sum(Sales))

hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
christian77
Partner - Specialist
Partner - Specialist

Watch! rank fuction = 1 is first, no last. 2 is the second, and so on. is there an inverse rank?

example kank(Vettel) = 1, rank(Alonso)=2, ......, rank(last), we don't know. How many are they?

If is a simple table, use dimension limits.

In the presentation tab check suppress cero values.Dimesion Limits.jpg

jchoucq
Partner - Creator III
Partner - Creator III
Author

it seems that suprress 0 value with smallest in the dimensions limits doesn't work.

I will try to send an example

MayilVahanan

Hi

For inverse,

rank(-sum(Sales))

hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
jchoucq
Partner - Creator III
Partner - Creator III
Author

thank you for your answers.

as a conclusion, the smallest option in the dimension limits is diffocult to use without writing a specific expression. See qvw in attachement

MayilVahanan

Hi

PFA

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
jchoucq
Partner - Creator III
Partner - Creator III
Author

thank you, i know this method in a straight table, but we can't do the same in the bar chart below !

MayilVahanan

Hi

PFA

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
jchoucq
Partner - Creator III
Partner - Creator III
Author

Thank you very much Mayil. It works indeed.

But i noticed you don't use Dimensions Limits