i think you can use an expression like this one:
=If(aggr(rank(sum(Sales)),mag)>=TOPN and aggr(rank(sum(Sales)),mag)<=TOPN1,mag,null())
the ">=TOPN" and "<=TOPN" work fine in a listbox. Nevertheless I prefer the Dollarsign-expansion for variables. (see online help for more details).
The formula is then:
=If(aggr(rank(sum(Sales)),mag)>= $(TOPN) and aggr(rank(sum(Sales)),mag)<= $(TOPN1),mag,null())
and works now also as a calculated dimension and more.
I had some troubles with your values because you are using the comma "," as DezimalSep.
many thanks for help; very very useful
to go a little bit further a have one more challenge to this situation: i want to create a new slider like this but with percents in which i want to select for example: first 20% or the middle part 30%-->60% (not the ranks as number)
imagine all mag sorted after sales and a column with their share in total; when i select in slider 20%-->60% i want a selection with all mag situated in this range
mag 1 20%
mag 2 10%
mag 3 5%
slider selection 30% -35% ---- mag 1, mag 2
slider selection 0-20% (top 20% ) --- mag 1
ps: first time i tried in list box $(TOPN) but it didn't work