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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get the data from range 5th to 10th ?

Hi all,

I am trying to get the cities which have the total number of arrivals ranked from 5th to 10th.

This is the set analysis I have for now but seems doesn't work:

SUM({<Arrival_MonthYear={'$(=max(Arrival_MonthYear))'},[Country of Residence] = {"=Rank(sum({<[Country of Residence]=>}[Number of Arrivals]))={“<=(=25)>=(=15)”}"}>}[Number of Arrivals])

Can anyone help?

Thank you!!!

Best Regards,

Allison

4 Replies
sunny_talwar
MVP
MVP

May be this:

Sum({<Arrival_MonthYear={'$(=max(Arrival_MonthYear))'}, [Country of Residence] = {"=

Rank(Sum({<[Country of Residence]=>}[Number of Arrivals]) >= 5 and

Rank(Sum({<[Country of Residence]=>}[Number of Arrivals]) <= 10”}>}

[Number of Arrivals])

Not applicable
Author

Hi Sunny,

Thanks for reply.

But it doesn't work.

Not applicable
Author

I have got the one that works correctly just in case anyone needs it:

if(Rank(sum({<Arrival_MonthYear={'$(=max(Arrival_MonthYear))'}>}[Number of Arrivals]))>5 and Rank(sum({<Arrival_MonthYear={'$(=max(Arrival_MonthYear))'}>}[Number of Arrivals]))<10,

SUM({<Arrival_MonthYear={'$(=max(Arrival_MonthYear))'},Region={'AMERICAS'}>}[Number of Arrivals]),-1)

jonathandienst
Partner - Champion III
Partner - Champion III

You could use a calculated dimension of this form:

=Aggr(If(Rank(Sum(Value)) > 5 And Rank(Sum(Value)) <= 10, Dimension), Dimension)

Sum(Value) - the expression that represents the value to be ranked.

Dimension -  a field (not an expression) by which the ranking should happen

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