3 Replies Latest reply: Apr 20, 2012 11:54 AM by Jose Tos

# How can I filter by ranks?

Hi everyone,

I would to know how could I filter an expression in a chart by ranks of values.

There is an option to choose different colours if the expression is more or less than a value so I want a similar thing but instead painting the colours, filtering by that rank of values to show me only that data that is the most relevant.

Any ideas?? Thank´s!!

Se aceptan respuestas en español, gracias

Saludos,

Chema.

• ###### How can I filter by ranks?

aggr(if(rank(Expression<=50,Dimension),Dimension) Using this as the dimension will return just 1-50 ranked dimensions based on the expression.

I have used this that returns the top 50 customers per company based on their order amount

=aggr(if(rank(sum([Order Amount]))<=50,Customer),Company,Customer)

• ###### Re: How can I filter by ranks?

Hi marcsliving,

I need to show the maximum and the minimum dynamically on the same chart. I´ve thought to do two entry boxes so the user could choose the maximum and the minimum and make an expression like this:

Sum({<[SSTT kg] = {"(>=\$(maximo))"},[SSTT kg]={"(<=\$(minimo))"}>} [SSTT kg])

But the syntax is incorrect, I don´t know how to do it.

The next expression is working to show the values bigger than \$(maximo) but with the other expression I`m getting only the values less than \$(minimo) but no both of filters.

Sum({<[SSTT kg] = {"(>=\$(maximo))"}>}[SSTT kg]) //working

Sum({<[SSTT kg] = {"(>=\$(maximo))"},[SSTT kg]={"(<=\$(minimo))"}>} [SSTT kg]) //only working second filter [SSTT kg]={"(<=\$(minimo))"}

Sorry about the confussion, this is filtering more than ranking.

Thanks

• ###### Re: How can I filter by ranks?

That´s finally working

If((Sum({<[SSTT kg] = {"(>=\$(maximo))"}>} [SSTT kg]) or Sum({<[SSTT kg] ={"(<=\$(minimo))"}>} [SSTT kg]))=-1,[SSTT kg],Null())