7 Replies Latest reply on Dec 5, 2018 4:16 PM by Maciej Bedlin

# Filtering for top Nth value based on rank.

Hi All

as per Don Wise suggestion new topic for new question...

I wish to filter my graph based on rank position..

so I need to create 5 graphs with each one for specific rank so graph for rank one customer rank 2 for second and so on for my dashboard...

how can I dynamically change customer filter so it will always adjust based on sales in this example...

I was thinking about the top N filter and somehow maybe only take 2 value? for top2?

• ###### 1. Re: Filtering for top Nth value based on rank.

I would like to add that that it was proposed to use parameter of some sort but I am unsure how

• ###### 2. Re: Filtering for top Nth value based on rank.

Hi Maciej,

Tableau has a tutorial for this very thing !

HTH

Peter

• ###### 3. Re: Filtering for top Nth value based on rank.

@Peter Fakan

the solution you have provided does work but I need to use the ranked "Customer" to filter line graph on other sheet.

and the same rank calculation doesn't copy the values from main sheet

one using plane data with numbers the trick works brilliantly

• ###### 4. Re: Filtering for top Nth value based on rank.

Hi, Maciej

Is it something shown below? as your two worksheets use different top N, the line chart is based on profit while your rank uses order count.

ZZ

• ###### 5. Re: Filtering for top Nth value based on rank.

Thanks but not really..

this sample file is not perfect as the rank is not really working...due to multiple values per rank...

in the data set I'm working with I need to rank all the values based on shipment number per site

and then for top 5 sites produce detailed breakdown for number of items per shipment so how many shipments of 2 items 3 items 55 items and so on..

but I would like to filter each set based on the position in the ranking.. so sheet 1 will always show breakdown for site positioned 1st sheet 2 for the one in position 2 and so on...

I'm trying to do the same in excel using pivot table on data set downloaded as costab but failing there too

• ###### 6. Re: Filtering for top Nth value based on rank.

Hi Maciej,

For this viz you will need the rank pill on the columns shelf.

Can you re-upload your viz with where you have gotten up to so I can take a look ?

HTH

Peter

• ###### 7. Re: Filtering for top Nth value based on rank.

as much as I would like to I can't both due to sensitivity of data and size of it.

I know how to do top 10 or top 5 etc. problem is to select only the 5th one to be displayed

I may have to try and recreate it in excel and do some filtering between sheets isind values from specific cell ( Call B3 will always have 2nd top value etc.)

but really wanted to add this feature to current dashboard we are using