4 Replies Latest reply: Nov 4, 2016 2:59 AM by Jonathan Dienst

# 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

• ###### Re: How to get the data from range 5th to 10th ?

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])

• ###### Re: How to get the data from range 5th to 10th ?

Hi Sunny,

But it doesn't work.

• ###### Re: How to get the data from range 5th to 10th ?

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)

• ###### Re: How to get the data from range 5th to 10th ?

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