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: 
Not applicable

Strange behaviour of Rank() as dimension

Hi Everybody,

I'm facing with a strange behaviour of Rank that I'm not undestanding (Qlikview 11.20 SR9).

I would like to limit the list of countries of a straight table to top 50, using this Calculated Dimension:

=AGGR(IF(Rank(sum({<[Year]={$(v_Year_Of_Interest)}>} $(v_Price)), 4)<=50, [Customer Country]), [Customer Country])

Actually there's a total number of 23 countries to show, so I'm expecting that all of them are displayed, but it's not: only 21 are shown.

In order to check the correctness of logic, I've tried to use a Pivot Table with [Customer Country] as Dimension and a limit of 50, and  everything works well (I see all 23 countries). It also works well if I use <=100 instead of <=50 on the straight...and is this that amaze me: why I have to increase the limit to 100 if I only have 23 countries?

Another way to see all 23 countries is leaving <= 50 but uncheck the "Suppress when value is null"... again: why?

Any idea about that?

Thanks in advance

Luca

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Can you post a qlikview document that demonstrates the problem?


talk is cheap, supply exceeds demand
jonathandienst
Partner - Champion III
Partner - Champion III

Why don't you use Dimension Limits rather than the Rank function? Select Show Only / First / 50.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Dimension Limits only works on pivot,and I need a Straight Table.

I'll try to post the document, but it's not easy to clean it from customer data.